Add a Jenkinsfile

Add a Jenkinsfile to the repository

If the plugin repository does not already include a Jenkinsfile, add a Jenkinsfile so that will automatically compile and test the plugin and any pull requests submitted to the plugin.

Create a branch

Create a git branch for your local work with the command:

$ git checkout -b add-a-jenkinsfile master

Create the Jenkinsfile

Create a file named Jenkinsfile with the single line content:


Create a pull request

Commit that change:

$ git add Jenkinsfile
$ git commit -m "Add Jenkinsfile for"

Push the change to GitHub:

$ git push origin --set-upstream add-a-jenkinsfile
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Create a pull request for 'add-a-jenkinsfile' on GitHub by visiting:
 * [new branch]      add-a-jenkinsfile -> add-a-jenkinsfile
Branch 'add-a-jenkinsfile' tracking remote branch 'add-a-jenkinsfile'.

Notice that the output of the command includes the URL, which can be used to open a pull request. Copy that URL in your web browser and submit a pull request.

A job will be automatically created in the Plugins folder after the pull request is merged and the GitHub organization folder is scanned by

For more details, see the continuous integration page for Jenkins developers.