./test-infra/jenkins contains the defined Jenkins jobs are defined in These jobs are written using the Job DSL using Apache Groovy. Job definitions should be a simple as possible and ideally identify a single Gradle target to execute.
The following are some Testing Changes tips that could help you:
- Use Local Dockerized Jenkins to test changes locally without breaking the project’s job definitions.
- Test a PR that includes Jenkins changes, but it is potentially destructive because the job definitions are a shared resource.
- Use the “Run Seed Job” trigger phrase to update the job definitions on a PR. This will cause the job definitions to be read and parsed, and they will be active until the next scheduled execution on beam_SeedJob or beam_SeedJob_Standalone.
Beam committers can trigger a job with the Jenkins UI. Non-committers can trigger a job if there is a trigger phrase.
Each post-commit and pre-commit job file defines several jobs with different suffixes.
- For pre-commits, there are
_Commitjob happens with every push to a pull request.
_Phrasehappens when the trigger phrase is entered as a comment in the pre-commit.
_Cronpre-commit happens post-commit on the master branch as a signal of whether the pre-commit would pass without any changes.
Consider the following tips regarding Jenkins-jobs-related tags:
- Most Beam Jenkins jobs specify the label
beam, which uses beam executors 1-15.
- Performance test jobs specify the label
beam-perf, which uses beam executors 16.
- Website publishing job specifies the label
git-websites, which allows publishing generated documentation to the asf-site branch.
How to access a test history
To access a test history:
- Look at this URL:
- Go to failed job -> test result -> navigate to failed test -> history
How to delete jobs that are no longer needed
To delete jobs that are no longer needed in Jenkins:
`.groovy`file associated with the job. For more information, see
- Delete the job history from Jenkins.
- Open https://ci-beam.apache.org/ and log in with your Apache Credentials.
- Select the job you want to remove.
- Click Delete project in the left side panel.
Jenkins Infrastructure Setup
16 GCE instances support Jenkins' continuous integrating jobs. The instance group
'apache-beam-jenkins-jnlp-group' manages the compute instances in the Google Cloud project
'apache-beam-testing'. Each instance has 16 CPUs and 104GB of memory.
|Instance Name (Jenkins agent names are same)||Jenkins Label|
How to install and upgrade software on Jenkins workers
All software updates must be performed and verified in a temporary experimental compute instance. To install or upgrade tools for Jenkins instances:
Create a compute instance with the most recently created boot image.
You can create the instance through VM Instances in Cloud Console or by running the
Connect using ssh to the instance via Cloud Console or
Install or upgrade the required tools:
Verify the tool by running corresponding Beam tests.
Verify backwards compatibility by running Beam PostCommits against all SDKs.
Clone Beam repository from Git:
Run your tests by Gradle wrapper. For example:
Remove beam repository after verification.
Create a new image from the experiment instances and named it as
jenkins-slave-boot-image-YYYYMMDD. Put the image in the family of
For each instance:
Stop the VM, then click edit.
Delete the existing boot disk by clicking the 'X'.
Create a new boot disk by using the newly generated image.
Name disk as
Make sure the boot disk 'Model' is 'Boot, read/write'.
Go to the Pantheon Disks and remove all deprecated Jenkins slave disks.
- Ask a PMC member to reboot the Jenkins executors. (For PMC, you'll need to ssh to the VMs and run the command listed in the Beam SVN repo, https://svn.apache.org/repos/private/pmc/beam/accounts/JenkinsWorkersSecrets.txt.)