-
Notifications
You must be signed in to change notification settings - Fork 6
Your first pipeline job
From the Jenkins homepage, you click on the create new job
link.
You will now see a screen to chose what type you want the new job to be.
For the sake of this tutorial, you will chose Pipeline
.
Please don't forget to add a name for your new job 😉.
Next, you'll need to configure the new pipeline job to be able to checkout the spring-petclinic project you forked before.
Skip all configuration sections and focus on the fields from the Pipeline
tab.
Here, change the Definition
to Pipeline script from SCM
.
This way, you will version in Git the Jenkinsfile containing the actual steps of your job.
Chose Git
as your SCM
and complete the repository url for the forked spring-petclinic project.
Let the other fields with their default values.
In the end, your configuration should look like the one below.
You can now Save
your configuration.
Start your first build by clicking the Build now
button.
A new build will be added into your Build history
.
As you can see, your build has a red bullet. As you can imagine, something went bad with your build.
Let's check what happened by clicking the build number (i.e. #1
).
You will be now be displayed the console output of your build.
The fact that we don't have a Jenkinsfile in our project is the culprit of the build failure.