Skip to content

Your first pipeline job

Valentina-Camelia Bojan edited this page Nov 2, 2019 · 1 revision

From the Jenkins homepage, you click on the create new job link. Create new job

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 😉.

Create pipeline 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.

Configure pipeline job

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.

Trigger first build

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.

Unable to find Jenkinsfile

Clone this wiki locally