4 name: opendaylight-infra-properties
7 days-to-keep: "{build-days-to-keep}"
9 # Need to keep artifacts for at least 1 day as some projects need to
10 # be able to validate their artifacts and only allowing limited
11 # number of artifacts could make fast moving jobs lost their
12 # artifacts before the developers can test it.
13 artifact-days-to-keep: 1
16 name: opendaylight-infra-parameters
21 description: "Parameter to identify an ODL Gerrit project"
23 name: ARCHIVE_ARTIFACTS
24 # Before adding more here, beware of https://jira.linuxfoundation.org/browse/RELENG-280
27 **/target/surefire-reports/*-output.txt
28 **/target/failsafe-reports/failsafe-summary.xml
30 **/target/feature/feature.xml
31 # TODO: **/*.hprof is too large, compress with xz first
33 Space separated glob patterns for artifacts to archive
34 into s3-logs.opendaylight.org/logs
38 description: "GERRIT_PROJECT parameter if not given by trigger"
42 description: "JJB configured GERRIT_BRANCH parameter"
47 Gerrit reference to checkout (ex: refs/heads/master,
48 refs/changes/48/61548/1 where 61548 is Gerrit change ID, 1 is
49 patch number and 48 is last two digits of change ID)
52 default: "$SILO-$JOB_NAME-$BUILD_NUMBER"
53 description: "Used by Heat to generate a unique stack & vm name"
58 The name of a cloud configuration in clouds.yaml. OS_CLOUD is a
59 variable name that is significant to openstack client as a
60 environment variable. Please refer to the documentation for
62 https://docs.openstack.org/developer/python-openstackclient/
65 name: distribution-branch-to-build-parameter
68 name: DISTRIBUTION_BRANCH_TO_BUILD
70 description: "distribution repo branch to build with"
77 default: "/w/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn"
78 description: "Maven selector to be used by shell scripts"
84 credentials-id: "opendaylight-jenkins-ssh"
93 name: git-scm-with-submodules
96 credentials-id: "opendaylight-jenkins-ssh"
100 - "refs/heads/{branch}"
107 name: gerrit-trigger-scm
110 credentials-id: "opendaylight-jenkins-ssh"
114 - "origin/$GERRIT_BRANCH"
116 choosing-strategy: "{choosing-strategy}"
118 # This is a single macro to use for all jobs who vote on every (relevant) patch set.
119 # Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
120 # in order to prevent Jenkins from starting only a subset and still voting Verified+1.
122 # gerrit-server-name: name of gerrit server to listen to
123 # project: pattern to match triggering projects
124 # branch: triggering branch name
125 # files: pattern to match triggering filepaths
127 name: gerrit-trigger-patch-submitted
130 server-name: "{gerrit-server-name}"
132 - patchset-created-event:
134 exclude-trivial-rebase: false
135 exclude-no-code-change: false
136 - draft-published-event
137 - comment-added-contains-event:
138 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
140 - project-compare-type: ANT
141 project-pattern: "{project}"
143 - branch-compare-type: ANT
144 branch-pattern: "**/{branch}"
148 forbidden-file-paths:
149 - compare-type: REG_EXP
150 pattern: "{forbidden-files}"
152 # TODO: Unify argument names across gerrit-trigger-* macros.
154 name: gerrit-trigger-patch-merged
157 server-name: "{gerrit-server-name}"
159 - change-merged-event
160 - comment-added-contains-event:
161 comment-contains-value: "remerge$"
163 - project-compare-type: "ANT"
164 project-pattern: "{name}"
166 - branch-compare-type: "ANT"
167 branch-pattern: "**/{branch}"
171 forbidden-file-paths:
172 - compare-type: REG_EXP
173 pattern: "{forbidden-files}"
179 # Force Jenkins always vote the values it should already have voted
180 # during the prior verify phase
182 gerrit-build-started-verified-value: 1
183 gerrit-build-successful-verified-value: 1
184 gerrit-build-failed-verified-value: 1
185 gerrit-build-unstable-verified-value: 1
186 gerrit-build-notbuilt-verified-value: 1
187 gerrit-build-started-codereview-value: 0
188 gerrit-build-successful-codereview-value: 0
189 gerrit-build-failed-codereview-value: 0
190 gerrit-build-unstable-codereview-value: 0
191 gerrit-build-notbuilt-codereview-value: 0
194 name: email-notification
197 recipients: "{email-recipients}"
199 content-type: default
200 subject: "{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!"
202 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
204 Please refer to the logs server URL for console logs when possible
205 and use the Jenkins Build URL as a last resort.
208 https://s3-logs.opendaylight.org/logs/$SILO/$JENKINS_HOSTNAME/$JOB_NAME/$BUILD_NUMBER
218 name: opendaylight-infra-stack
219 # opendaylight-infra-stack.sh has a required variable {stack-template} that
220 # must be passed into this macro.
222 - shell: !include-raw: opendaylight-infra-stack.sh
223 - shell: !include-raw-escape: opendaylight-infra-copy-ssh-keys.sh
226 name: distribute-build-url
227 # Place URL of the current run of a build job to a file at given path.
231 set +e # DO NOT fail script if command returns non-zero.
233 echo "$BUILD_URL" > {path}/build.url
235 # DO NOT fail the build if the echo failed.
239 name: wipe-org-opendaylight-repo
241 - shell: "if [ -d /tmp/r/org/opendaylight ]; then rm -rf /tmp/r/org/opendaylight; fi"
244 name: wipe-local-maven-repo
246 - shell: "if [ -d /tmp/r ]; then rm -rf /tmp/r; fi"
249 # This wrapper is required for all jobs as it configures the wrappers
250 # needed by OpenDaylight infra.
251 name: opendaylight-infra-wrappers
254 - config-file-provider:
257 target: "$HOME/.npmrc"
259 target: "$HOME/.config/pip/pip.conf"
260 - file-id: clouds-yaml
261 target: "$HOME/.config/openstack/clouds.yaml"
264 timeout: "{build-timeout}"
265 timeout-var: "BUILD_TIMEOUT"
268 - ssh-agent-credentials:
270 - "opendaylight-jenkins-ssh"
275 name: opendaylight-infra-generate-csit-status-report
287 - shell: !include-raw: generate-csit-status-report.sh
288 mark-unstable-if-failed: true