Pull request testing
Using a package ros_buildfarm, you can run the build and test logic that ROS build farm runs on the host of your choice. ROS build farm also provides pull request testing for repositories hosted on GitHub.
Enable pull request testing for a specific repository on Github
For each repository the following two things must be done.
Link Jenkins and your GitHub repository
There are two ways to do this as following. For some GitHub org unit this might have already been done. If you need it to be added to an org unit please contact the maintainers of the org unit or ask on answers.ros.org.
(Recommended) Grant admin access to the org unit (i.e. not just the repository) for ros-pull-request-builder, a ROS buildfarm GitHub user account. To do so:
At "Collaborators", add "ros-pull-request-builder" (in the dash line in the following figure)).
Select "Admin" from the pulldown.
Jenkins uses the Pull Request Builder plugin to setup the webhooks which trigger Jenkins for new or updated pull requests and report back the status. Therefore the GitHub org unit where the repository is located must grant push, pull and administrative rights to the user .
Alternatively you can setup the webhook manually for each repository to avoid the need for administrative rights on the org unit (or if the repository is not in an organization and thus you don't have the ability to give "Admin" access). Then the Jenkins user only needs write permissions.
- Use the above procedure to grant "Write" access instead of "Admin", or if the repository is not part of an organization, add as a collaborator without selecting anything from a nonexistent dropdown.)
Go to "https://github.com/%YOUR_ORG%/%YOUR_REPO%/settings/hooks/new", then on the same page:
Enter the "Payload URL" "https://build.ros.org/ghprbhook/"
- Check the following:
- "Let me select individual events."
You must add the test_pull_requests flag for the source entry of a specific repository in the distribution file and set it to true. E.g. see the Indigo distribution file. The configuration option is documented in REP 143.
If you use bloom to make a new release of your software, there's an option to set this while running it.
Note that after the pull request has been added, the job will usually not be created until the nightly Jenkins reconfiguration.
Integration with other CI systems
If you don't want to use the official Jenkins server you can also setup any other CI systems (e.g. Travis) for your repository while still leveraging the logic provided by the Python package ros_buildfarm. Please look at the documentation for an example .travis.yml file.
Integration using other services
The Python package ros_buildfarm also provides scripts for running various jobs on the command line. A pull request job is simply a devel job being triggered for the specific branch of the pull request. The documentation describes how to run devel jobs locally. This can be used to perform the task of a specific job locally as well as within any service provider like Travis.
Once the system is set up, the pull requests will be tested
- When a new PR is opened
- New commits are added to a PR
When you ask nicely with a comment on a PR @ros-pull-request-builder retest this please