Scripts to run a Jenkins CI build against every open pull request of a GitHub project.
The scripts require your Jenkins environment to have the following installed:
- bash
- curl
It requires the following Jenkins plugins:
- Description Setter https://wiki.jenkins-ci.org/display/JENKINS/Description+Setter+Plugin
- XTrigger http://wiki.jenkins-ci.org/display/JENKINS/XTrigger+Plugin
It obviously also requires Git and GitHub plugins at Jenkins.
- Enable
Prepare an environment for the run
and add your project's URL toProperties Content
:
GITHUB_USER_PROJECT=FranciscoBorges/JenkinsOnPullRequests
GITHUB_PROJECT_URL=https://github.com/FranciscoBorges/JenkinsOnPullRequests
-
Enable
[ScriptTrigger] - Poll with a shell or batch script
and use the contents ofbuildTrigger.sh
. Set a suitable checking period (e.g.*/5 * * * *
). -
Enable
Set build description
, usingPullNumber=[0-9]*
for regular expression.