What is a Job?
A Job in Jenkins is used to perform a set of tasks. Jenkins jobs are of two types:
- Freestyle — the older, GUI-driven style.
- Pipeline — the newer, script-based style.
Basic Steps to Create a Job
- Click on "New Item" / Create a job.
- Enter the task name.
- Choose Freestyle project or Pipeline depending on your requirement.
Connecting a Git Repository
- Copy the GitHub repo URL and paste it under Source Code Management → Git.
- If Git isn't installed on the server yet, install it on the AWS terminal:
yum install git -y
- For a public repo, no credentials are needed. For a private repo, credentials must be created (covered in the parameters/credentials topic).
- To build from a specific branch, mention the branch name under Branches to build. By default Jenkins uses
*/master.
Running the First Build
Important: If you edit code on GitHub, the change will not reflect on the Linux server until you run the build again — this is a fully manual step unless we set up automatic triggers.