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
32 description: 'Space separated glob patterns for artifacts to archive into logs.opendaylight.org'
36 description: "GERRIT_PROJECT parameter if not given by trigger"
40 description: "JJB configured GERRIT_BRANCH parameter"
45 Gerrit reference to checkout (ex: refs/heads/master,
46 refs/changes/48/61548/1 where 61548 is Gerrit change ID, 1 is
47 patch number and 48 is last two digits of change ID)
50 default: '$SILO-$JOB_NAME-$BUILD_NUMBER'
51 description: "Used by Heat to generate a unique stack & vm name"
56 The name of a cloud configuration in clouds.yaml. OS_CLOUD is a
57 variable name that is significant to openstack client as a
58 environment variable. Please refer to the documentation for
60 https://docs.openstack.org/developer/python-openstackclient/
63 name: patches-to-build-parameter
66 name: PATCHES_TO_BUILD
69 Ordered list of patches to build in the format of project=changeset (checkout) or
70 project:changeset (cherry-pick) for example: genius=32/53632/9,netvirt:59/50259/47.
71 A topic is also allowed, for example: topic=binding-tlc-rpc
74 name: build-order-parameter
78 default: '{build-order}'
79 description: 'Build order for multipatch test when topic is used'
82 name: build-fast-parameter
86 default: '{build-fast}'
87 description: 'Set true to build fast -Pq'
90 name: run-test-parameter
95 description: 'Set true to run test after build'
98 name: distribution-branch-to-build-parameter
101 name: DISTRIBUTION_BRANCH_TO_BUILD
103 description: 'distribution repo branch to build with'
110 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn'
111 description: 'Maven selector to be used by shell scripts'
117 credentials-id: 'opendaylight-jenkins-ssh'
126 name: git-scm-with-submodules
129 credentials-id: 'opendaylight-jenkins-ssh'
133 - 'refs/heads/{branch}'
140 name: gerrit-trigger-scm
143 credentials-id: 'opendaylight-jenkins-ssh'
147 - 'origin/$GERRIT_BRANCH'
149 choosing-strategy: '{choosing-strategy}'
151 # This is a single macro to use for all jobs who vote on every (relevant) patch set.
152 # Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
153 # in order to prevent Jenkins from starting only a subset and still voting Verified+1.
155 # gerrit-server-name: name of gerrit server to listen to
156 # project: pattern to match triggering projects
157 # branch: triggering branch name
158 # files: pattern to match triggering filepaths
160 name: gerrit-trigger-patch-submitted
163 server-name: '{gerrit-server-name}'
165 - patchset-created-event:
167 exclude-trivial-rebase: false
168 exclude-no-code-change: false
169 - draft-published-event
170 - comment-added-contains-event:
171 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
173 - project-compare-type: ANT
174 project-pattern: '{project}'
176 - branch-compare-type: ANT
177 branch-pattern: '**/{branch}'
181 forbidden-file-paths:
183 pattern: '{forbidden-files}'
185 # TODO: Unify argument names across gerrit-trigger-* macros.
187 name: gerrit-trigger-patch-merged
190 server-name: '{gerrit-server-name}'
192 - change-merged-event
193 - comment-added-contains-event:
194 comment-contains-value: 'remerge$'
196 - project-compare-type: 'ANT'
197 project-pattern: '{name}'
199 - branch-compare-type: 'ANT'
200 branch-pattern: '**/{branch}'
204 forbidden-file-paths:
206 pattern: '{forbidden-files}'
212 # Force Jenkins always vote the values it should already have voted
213 # during the prior verify phase
215 gerrit-build-started-verified-value: 1
216 gerrit-build-successful-verified-value: 1
217 gerrit-build-failed-verified-value: 1
218 gerrit-build-unstable-verified-value: 1
219 gerrit-build-notbuilt-verified-value: 1
220 gerrit-build-started-codereview-value: 0
221 gerrit-build-successful-codereview-value: 0
222 gerrit-build-failed-codereview-value: 0
223 gerrit-build-unstable-codereview-value: 0
224 gerrit-build-notbuilt-codereview-value: 0
227 name: email-notification
230 recipients: '{email-recipients}'
232 content-type: default
233 subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
235 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
237 Please refer to the logs server URL for console logs when possible
238 and use the Jenkins Build URL as a last resort.
241 https://logs.opendaylight.org/$SILO/$JENKINS_HOSTNAME/$JOB_NAME/$BUILD_NUMBER
251 name: opendaylight-infra-stack
252 # opendaylight-infra-stack.sh has a required variable {stack-template} that
253 # must be passed into this macro.
255 - shell: !include-raw: opendaylight-infra-stack.sh
256 - shell: !include-raw-escape: opendaylight-infra-copy-ssh-keys.sh
259 name: opendaylight-apex-stack
260 # opendaylight-apex-stack.sh has a required variable {stack-template} that
261 # must be passed into this macro.
263 - shell: !include-raw: opendaylight-infra-stack.sh
266 name: distribute-build-url
267 # Place URL of the current run of a build job to a file at given path.
271 set +e # DO NOT fail script if command returns non-zero.
273 echo "$BUILD_URL" > {path}/build.url
275 # DO NOT fail the build if the echo failed.
279 name: wipe-org-opendaylight-repo
281 - shell: 'if [ -d /tmp/r/org/opendaylight ]; then rm -rf /tmp/r/org/opendaylight; fi'
284 name: wipe-local-maven-repo
286 - shell: 'if [ -d /tmp/r ]; then rm -rf /tmp/r; fi'
289 name: releng-openstack-stack-delete
302 echo "Deleting $STACK_NAME"
303 openstack stack delete --yes "$STACK_NAME"
304 mark-unstable-if-failed: false
307 # This wrapper is required for all jobs as it configures the wrappers
308 # needed by OpenDaylight infra.
309 name: opendaylight-infra-wrappers
312 - config-file-provider:
315 target: '$HOME/.npmrc'
317 target: '$HOME/.config/pip/pip.conf'
318 - file-id: clouds-yaml
319 target: '$HOME/.config/openstack/clouds.yaml'
322 timeout: '{build-timeout}'
323 timeout-var: 'BUILD_TIMEOUT'
326 - ssh-agent-credentials:
328 - 'opendaylight-jenkins-ssh'
333 name: opendaylight-infra-generate-csit-status-report
345 - shell: !include-raw: generate-csit-status-report.sh
346 mark-unstable-if-failed: true