Add a Jenkinsfile

Add a Jenkinsfile to the repository

If the plugin repository does not already include a Jenkinsfile, add a Jenkinsfile so that ci.jenkins.io 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:

buildPlugin()

Create a pull request

Commit that change:

$ git add Jenkinsfile
$ git commit -m "Add Jenkinsfile for ci.jenkins.io"

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:
remote: Create a pull request for 'add-a-jenkinsfile' on GitHub by visiting:
remote: https://github.com/user/your-plugin/pull/new/add-a-jenkinsfile
remote:
To github.com:user/your-plugin.git
 * [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 ci.jenkins.io Plugins folder after the pull request is merged and the GitHub organization folder is scanned by ci.jenkins.io.

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