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'
106 name: p2zip-parameter
111 description: 'Nexus staging profile id'
114 name: stage-id-parameter
117 name: STAGING_PROFILE_ID
118 default: '{stage-id}'
119 description: 'Nexus staging profile id'
126 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn'
127 description: 'Maven selector to be used by shell scripts'
133 credentials-id: 'opendaylight-jenkins-ssh'
142 name: git-scm-with-submodules
145 credentials-id: 'opendaylight-jenkins-ssh'
149 - 'refs/heads/{branch}'
156 name: gerrit-trigger-scm
159 credentials-id: 'opendaylight-jenkins-ssh'
163 - 'origin/$GERRIT_BRANCH'
165 choosing-strategy: '{choosing-strategy}'
167 # This is a single macro to use for all jobs who vote on every (relevant) patch set.
168 # Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
169 # in order to prevent Jenkins from starting only a subset and still voting Verified+1.
171 # gerrit-server-name: name of gerrit server to listen to
172 # project: pattern to match triggering projects
173 # branch: triggering branch name
174 # files: pattern to match triggering filepaths
176 name: gerrit-trigger-patch-submitted
179 server-name: '{gerrit-server-name}'
181 - patchset-created-event:
183 exclude-trivial-rebase: false
184 exclude-no-code-change: false
185 - draft-published-event
186 - comment-added-contains-event:
187 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
189 - project-compare-type: ANT
190 project-pattern: '{project}'
192 - branch-compare-type: ANT
193 branch-pattern: '**/{branch}'
197 forbidden-file-paths:
199 pattern: '{forbidden-files}'
201 # TODO: Unify argument names across gerrit-trigger-* macros.
203 name: gerrit-trigger-patch-merged
206 server-name: '{gerrit-server-name}'
208 - change-merged-event
209 - comment-added-contains-event:
210 comment-contains-value: 'remerge$'
212 - project-compare-type: 'ANT'
213 project-pattern: '{name}'
215 - branch-compare-type: 'ANT'
216 branch-pattern: '**/{branch}'
220 forbidden-file-paths:
222 pattern: '{forbidden-files}'
228 # Force Jenkins always vote the values it should already have voted
229 # during the prior verify phase
231 gerrit-build-started-verified-value: 1
232 gerrit-build-successful-verified-value: 1
233 gerrit-build-failed-verified-value: 1
234 gerrit-build-unstable-verified-value: 1
235 gerrit-build-notbuilt-verified-value: 1
236 gerrit-build-started-codereview-value: 0
237 gerrit-build-successful-codereview-value: 0
238 gerrit-build-failed-codereview-value: 0
239 gerrit-build-unstable-codereview-value: 0
240 gerrit-build-notbuilt-codereview-value: 0
243 name: email-notification
246 recipients: '{email-recipients}'
248 content-type: default
249 subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
251 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
253 Please refer to the logs server URL for console logs when possible
254 and use the Jenkins Build URL as a last resort.
257 https://logs.opendaylight.org/$SILO/$JENKINS_HOSTNAME/$JOB_NAME/$BUILD_NUMBER
268 # Installs the openstack cli into a virtualenv at /tmp/v/openstack
269 name: odl-openstack-install
271 - shell: !include-raw: odl-openstack-install.sh
274 name: odl-openstack-check-image-protection
276 - shell: !include-raw: odl-openstack-check-image-protection.sh
279 name: odl-openstack-cleanup-old-images
281 - shell: !include-raw: odl-openstack-cleanup-old-images.sh
284 name: odl-openstack-cleanup-orphaned-nodes
286 - shell: !include-raw: odl-openstack-cleanup-orphaned-nodes.sh
289 name: odl-openstack-cleanup-stale-nodes
291 - shell: !include-raw: odl-openstack-cleanup-stale-nodes.sh
294 name: odl-openstack-cleanup-stale-stacks
296 - shell: !include-raw: odl-openstack-cleanup-stale-stacks.sh
299 name: odl-openstack-cleanup-stale-volumes
301 - shell: !include-raw: odl-openstack-cleanup-stale-volumes.sh
304 # Deploys a maven site to Nexus using lftools nexus-zip command
305 name: opendaylight-infra-deploy-maven-site
307 - lf-provide-maven-settings:
308 global-settings-file: global-settings
309 settings-file: '{settings-file}'
310 - lf-infra-create-netrc:
311 server-id: opendaylight-site
312 - shell: !include-raw-escape:
313 - global-jjb/shell/lftools-install.sh
314 - opendaylight-infra-deploy-maven-site.sh
315 - lf-provide-maven-settings-cleanup
318 name: opendaylight-infra-stack
319 # opendaylight-infra-stack.sh has a required variable {stack-template} that
320 # must be passed into this macro.
322 - shell: !include-raw: opendaylight-infra-stack.sh
323 - shell: !include-raw-escape: opendaylight-infra-copy-ssh-keys.sh
326 name: opendaylight-apex-stack
327 # opendaylight-apex-stack.sh has a required variable {stack-template} that
328 # must be passed into this macro.
330 - shell: !include-raw: opendaylight-infra-stack.sh
333 name: distribute-build-url
334 # Place URL of the current run of a build job to a file at given path.
338 set +e # DO NOT fail script if command returns non-zero.
340 echo "$BUILD_URL" > {path}/build.url
342 # DO NOT fail the build if the echo failed.
346 name: wipe-org-opendaylight-repo
348 - shell: 'if [ -d /tmp/r/org/opendaylight ]; then rm -rf /tmp/r/org/opendaylight; fi'
351 name: wipe-local-maven-repo
353 - shell: 'if [ -d /tmp/r ]; then rm -rf /tmp/r; fi'
356 name: jacoco-nojava-workaround
358 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
361 name: provide-maven-settings
363 - config-file-provider:
365 - file-id: '{global-settings-file}'
366 variable: 'GLOBAL_SETTINGS_FILE'
367 - file-id: '{settings-file}'
368 variable: 'SETTINGS_FILE'
371 name: releng-fetch-p2zip-if-necessary
374 # Cleanup any existing zips and metadata before we download the new update site
377 condition-kind: strings-match
378 condition-string1: '$P2ZIP_URL'
379 condition-string2: ''
380 condition-basedir: workspace
382 # TODO: Figure out latest snapshot version number to pull rather than hardcoding 1.1.1-SNAPSHOT
384 maven-version: '{maven-version}'
386 org.apache.maven.plugins:maven-dependency-plugin:get
387 org.apache.maven.plugins:maven-dependency-plugin:copy
389 -Dartifact=org.opendaylight.yangide:org.opendaylight.yangide.update-site:1.1.1-SNAPSHOT:zip
390 -DoutputDirectory=$WORKSPACE
391 settings: '{settings}'
392 global-settings: '{global-settings}'
395 name: releng-generate-p2pom
397 - shell: !include-raw: generate-p2pom.sh
400 name: releng-update-p2composite-metadata
402 - shell: !include-raw: update-p2composite-metadata.sh
404 condition-kind: file-exists
405 condition-filename: deploy-composite-repo.xml
406 condition-basedir: workspace
409 maven-version: '{maven-version}'
410 pom: 'deploy-composite-repo.xml'
411 goals: 'clean deploy -V -B -Dmaven.repo.local=/tmp/r'
412 settings: '{settings}'
413 global-settings: '{global-settings}'
416 name: releng-openstack-stack-delete
429 echo "Deleting $STACK_NAME"
430 openstack stack delete --yes "$STACK_NAME"
431 mark-unstable-if-failed: false
434 name: releng-stage-release
436 - shell: !include-raw: stage-release.sh
439 # This wrapper is required for all jobs as it configures the wrappers
440 # needed by OpenDaylight infra.
441 name: opendaylight-infra-wrappers
444 - config-file-provider:
447 target: '$HOME/.npmrc'
449 target: '$HOME/.config/pip/pip.conf'
450 - file-id: clouds-yaml
451 target: '$HOME/.config/openstack/clouds.yaml'
454 timeout: '{build-timeout}'
455 timeout-var: 'BUILD_TIMEOUT'
458 - ssh-agent-credentials:
460 - 'opendaylight-jenkins-ssh'
465 name: opendaylight-infra-generate-csit-status-report
477 - shell: !include-raw: generate-csit-status-report.sh
478 mark-unstable-if-failed: true