When I am on the main Jenkins screen, I get a link to Create a New Job
.
When I create a new job and call it 'New Job' and run it I get results. When I review the results, I get a link to Back to Project
. When I click this I see Project New Job
on the top of the page.
So is a job and a project the same thing in Jenkins? Or are the names used interchangeably?
From the Jenkins CI forum: A project is a special case of a job, i.e. all projects are jobs, but not all jobs are projects. Perhaps it helps to extend mentally the names to "general purpose jobs" and "software building projects" (although the latter don't need to build software, they are tailored to this use case).
The major difference between any Jenkins job and a Jenkins Pipeline Job is that the Pipeline Scripted job runs on the Jenkins master. This uses a lightweight executor which uses only some resources to translate in the master to atomic commands that execute or send to the agents.
A job is a runnable task that Jenkins controls to achieve a required objective. Also, we can create a new job by clicking on "New Item" in the Jenkins dashboard.
This puzzled me quite a bit, too, and although this is an old question I thought I'd expand @Jan's comment with some content from the discussion he linked, as it might help other users.
From the Jenkins CI forum:
A project is a special case of a job, i.e. all projects are jobs, but not all jobs are projects.
Perhaps it helps to extend mentally the names to "general purpose jobs" and "software building projects" (although the latter don't need to build software, they are tailored to this use case).
In the case of "new job", Jenkins can't know yet if the new job will be of the project subtype. On the other hand, once you have chosen to create a project, this is reflected as specific as possible in the UI ("Project Foo"). If you look at the precise wording on the "New Job" page, you'll realize the subtle differences (e.g. "Build a free-style software project" as opposed to "Monitor an external job").
An example of a job that is not a project is the lesser known "external job" that receives notifications from events that happen outside Jenkins, but should be tracked inside Jenkins (e.g. system restarts, etc.). See https://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external+jobs for more about this job type.
For the records, this is the actual class model used by Jenkins internally (extending sub-classes are indented below their super-class):
Job AbstractProject MatrixProject (a.k.a. "multi-configuration project") Project FreeStyleProject MatrixConfiguration (a single configuration of a matrix project) StubJob ViewJob ExternalJob
Only FreeStyleProject, MatrixProject, and ExternalJob are visible on the "New Job" page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With