Repository navigation
Important settings for a Jenkins job
-
If the job needs a roscore running there are two options:
-
--roscoreor-rargument forrun_build.sh(see roscore) -
use the rostest package (see rostest documentation)
-
If the job requires additional system dependencies or setup steps, a prepare script can be used. For this, the
--prepare-system-scriptor-xargument forrun_build.shneeds to be set. See prepare-script. The script can runsudo apt-get install, other commands requiring sudo permissions are not possible.
If a Job is bound to a label or a node then Jenkins builds the job only on the specified node or a node (master or slave) with a matching label (see label). By binding a job to a certain label, a job can be restricted to certain operating systems / build environment.
The following labels are supported:
- ubuntu-trusty (with ROS indigo)
- ubuntu-xenial (with ROS kinetic)
- ubuntu : (the "current" Ubuntu. Still Trusty)
- osx (with ROS indigo)


Assuming the script is in tools/ci/prepare-jenkins-slave.sh and the repository gets extracted into src/ (Local subdirectory for repo) then this makes Jenkins run it after cloning the repository and its dependencies and before build.

Make sure to not have white spaces in the path to the prepare-jenkins-slave.sh script otherwise Jenkins may fail to execute it.
This binds the job to the label ubuntu-test:

Binding a job to GitHub pull requests is configured in Build triggers -> GitHub Pull Request Builder. Especially for open-source repositories, this can cause security issues as a PR can be created by everyone. Therefore Build every pull request automatically without asking (Dangerous!). must be deactivated. See #32.
When a new pull request is opened in the project and the author of the pull request isn't white-listed, builder will ask Can one of the admins verify this patch?. To interact with Jenkins, comment in GitHub using (copied from here):
-
ok to testto accept this pull request for testing -
test this pleasefor a one time test run -
add to whitelistto add the author to the whitelist If the build fails for other various reasons you can rebuild. -
retest this pleaseto start a new build