O'Reilly logo

Continuous Integration, Delivery, and Deployment by Sander Rossel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Jenkinsfile

Putting your script in the Jenkins configuration is fine, but there is an alternative, the Jenkinsfile. The Jenkinsfile is simply a file in your Git repository that contains the pipeline script you want to run. So, copy the pipeline script and place it in a file named Jenkinsfile (no extension) in the root of your repository and commit it to Git. Now, go to the configuration of your pipeline project and change the definition from Pipeline script to Pipeline script from SCM. You must now pick your SCM, which is Git, and then configure the connection to your repository. This works exactly the same as in freestyle projects. Additionally, there is a Script Path, which defaults to Jenkinsfile and Lightweight checkout, which you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required