Skip to content

Commit 715af7f

Browse files
authored
Merge pull request #5032 from AdamBrousseau/jenkins_readme_update
Update Jenkins README with instructions for configuring jobs
2 parents add2a6d + bedf978 commit 715af7f

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

buildenv/jenkins/README.md

+69
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,75 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-excepti
2424

2525
This folder contains Jenkins pipeline scripts that are used in the OMR Jenkins builds.
2626

27+
### Setting up a Jenkins job
28+
29+
#### Merge Builds
30+
31+
From the [Builds view](https://ci.eclipse.org/omr/view/Builds/), on the left menu select [New Item](https://ci.eclipse.org/omr/view/Builds/newJob). Name the job based on the following convention `Build-<SPEC>` (eg. `Build-linux_x86-64`. See [omrbuild.groovy](./omrbuild.groovy) for full `SPEC` list). Select `Pipeline` as the job type and then click `OK`. Setup the following in the job config.
32+
33+
1. General
34+
1. Discard old builds -> Max # of builds to keep: `25`
35+
1. GitHub project -> Project url: `https://github.com/eclipse/omr/`
36+
1. This project is parameterized -> Choice Parameter -> Name: `BUILDSPEC` -> Choices: `<SPEC>` (The matching SPEC name)
37+
1. Build Triggers
38+
1. Generic Webhook Trigger (defaults should be fine)
39+
1. Pipeline
40+
1. Definition: Pipeline script from SCM
41+
1. SCM: Git
42+
1. Repositories -> Repository URL: `https://github.com/eclipse/omr.git`
43+
1. Branches to build: `/refs/heads/master`
44+
1. Script Path: `buildenv/jenkins/omrbuild.groovy`
45+
1. Lightweight checkout: `true`
46+
47+
#### Pull Request Builds
48+
49+
From the [Pull Requests view](https://ci.eclipse.org/omr/view/Pull%20Requests/), on the left menu select [New Item](https://ci.eclipse.org/omr/view/Pull%20Requests/newJob). Name the job based on the following convention `PullRequest-<SPEC>` (eg. `PullRequest-linux_x86-64`. See [omrbuild.groovy](./omrbuild.groovy) for full `SPEC` list). Select `Pipeline` as the job type and then click `OK`. Setup the following in the job config.
50+
51+
1. General
52+
1. GitHub project -> Project url: `https://github.com/eclipse/omr/`
53+
1. This project is parameterized -> Choice Parameter -> Name: `BUILDSPEC` -> Choices: `<SPEC>` (The matching SPEC name)
54+
1. Build Triggers
55+
1. GitHub Pull Request Builder
56+
1. Admin list: `<Committers' Github IDs>` (Should be auto filled from Global Config)
57+
1. Use github hooks for build triggering: `true`
58+
1. Trigger phrase: `.*genie-omr build.*(aix|all).*` (Replace aix with spec shorthand. Where aix is a shorthand for aix_ppc-64)
59+
1. White list: `<List of Github IDs allowed to launch PR builds>`
60+
1. Trigger Setup
61+
1. Add -> Update commit status during build -> Commit Status Context: `continuous-integration/eclipse-omr/pr/<SPEC>`
62+
1. Add -> Cancel build on update
63+
1. Pipeline
64+
1. Definition: Pipeline script from SCM
65+
1. SCM: Git
66+
1. Repositories
67+
1. Repository URL: `https://github.com/eclipse/omr.git`
68+
1. Advanced -> Refspec: `+refs/pull/${ghprbPullId}/merge:refs/remotes/origin/pr/${ghprbPullId}/merge`
69+
1. Branches to build: `${sha1}`
70+
1. Additional Behaviours
71+
1. Clean before checkout
72+
1. Advanced clone behaviours
73+
1. Fetch tags: `false`
74+
1. Honor refspec on initial clone: `true`
75+
1. Script Path: `buildenv/jenkins/omrbuild.groovy`
76+
1. Lightweight checkout: `false`
77+
78+
#### Configuring the Github repo hooks
79+
80+
Eclipse admins must do this via a [Bugzilla](https://bugs.eclipse.org/bugs/enter_bug.cgi) request. Product: Community, Component: GitHub
81+
82+
1. Generic Webhook for Merge builds<br>
83+
Payload URL: `https://ci.eclipse.org/omr/generic-webhook-trigger/invoke`<br>
84+
Content type: `application/json`<br>
85+
Enable SSL verification: `true`<br>
86+
Which events would you like to trigger this webhook?: `Just the push event`<br>
87+
Active: `true`<br>
88+
89+
1. Github PullRequest Trigger Webhook<br>
90+
Payload URL: `https://ci.eclipse.org/omr/ghprbhook/`<br>
91+
Content type: `application/x-www-form-urlencoded`<br>
92+
Enable SSL verification: `true`<br>
93+
Which events would you like to trigger this webhook?: `Let me select individual events` -> `Issue comments`, `Pull requests`, `Pushes`<br>
94+
Active: `true`<br>
95+
2796
### Pipeline script from SCM subtleties with Rocket Git for z/OS
2897

2998
Configuring Jenkins to pull the pipeline scripts from Git on z/OS is a non-trivial effort. The Rocket Git for z/OS [1] port does not support _https_ transport protocol, thus specifying the repository in the _Repository URL_ with an `https://` prefix will not work as Jenkins will encounter errors when trying to execute commands on the slave:

0 commit comments

Comments
 (0)