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/
68 description: 'Tag in Git to checkout'
71 name: controller-version-parameter
75 default: '{odl_version}'
76 description: 'Controller version (for use with openstacks networking_odl project)'
79 name: patches-to-build-parameter
82 name: PATCHES_TO_BUILD
85 Ordered list of patches to build in the format of project=changeset (checkout) or
86 project:changeset (cherry-pick) for example: genius=32/53632/9,netvirt:59/50259/47.
87 A topic is also allowed, for example: topic=binding-tlc-rpc
90 name: build-order-parameter
94 default: '{build-order}'
95 description: 'Build order for multipatch test when topic is used'
98 name: build-fast-parameter
102 default: '{build-fast}'
103 description: 'Set true to build fast -Pq'
106 name: run-test-parameter
110 default: '{run-test}'
111 description: 'Set true to run test after build'
114 name: distribution-branch-to-build-parameter
117 name: DISTRIBUTION_BRANCH_TO_BUILD
119 description: 'distribution repo branch to build with'
122 name: p2zip-parameter
127 description: 'Nexus staging profile id'
130 name: stage-id-parameter
133 name: STAGING_PROFILE_ID
134 default: '{stage-id}'
135 description: 'Nexus staging profile id'
142 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn'
143 description: 'Maven selector to be used by shell scripts'
149 credentials-id: 'opendaylight-jenkins-ssh'
158 name: git-scm-with-submodules
161 credentials-id: 'opendaylight-jenkins-ssh'
165 - 'refs/heads/{branch}'
172 name: gerrit-trigger-scm
175 credentials-id: 'opendaylight-jenkins-ssh'
179 - 'origin/$GERRIT_BRANCH'
181 choosing-strategy: '{choosing-strategy}'
191 # This is a single macro to use for all jobs who vote on every (relevant) patch set.
192 # Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
193 # in order to prevent Jenkins from starting only a subset and still voting Verified+1.
195 # gerrit-server-name: name of gerrit server to listen to
196 # project: pattern to match triggering projects
197 # branch: triggering branch name
198 # files: pattern to match triggering filepaths
200 name: gerrit-trigger-patch-submitted
203 server-name: '{gerrit-server-name}'
205 - patchset-created-event:
207 exclude-trivial-rebase: false
208 exclude-no-code-change: false
209 - draft-published-event
210 - comment-added-contains-event:
211 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
213 - project-compare-type: ANT
214 project-pattern: '{project}'
216 - branch-compare-type: ANT
217 branch-pattern: '**/{branch}'
221 forbidden-file-paths:
223 pattern: '{forbidden-files}'
225 # TODO: Unify argument names across gerrit-trigger-* macros.
227 name: gerrit-trigger-patch-merged
230 server-name: '{gerrit-server-name}'
232 - change-merged-event
233 - comment-added-contains-event:
234 comment-contains-value: 'remerge$'
236 - project-compare-type: 'ANT'
237 project-pattern: '{name}'
239 - branch-compare-type: 'ANT'
240 branch-pattern: '**/{branch}'
244 forbidden-file-paths:
246 pattern: '{forbidden-files}'
252 # Force Jenkins always vote the values it should already have voted
253 # during the prior verify phase
255 gerrit-build-started-verified-value: 1
256 gerrit-build-successful-verified-value: 1
257 gerrit-build-failed-verified-value: 1
258 gerrit-build-unstable-verified-value: 1
259 gerrit-build-notbuilt-verified-value: 1
260 gerrit-build-started-codereview-value: 0
261 gerrit-build-successful-codereview-value: 0
262 gerrit-build-failed-codereview-value: 0
263 gerrit-build-unstable-codereview-value: 0
264 gerrit-build-notbuilt-codereview-value: 0
267 name: email-notification
270 recipients: '{email-recipients}'
272 content-type: default
273 subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
275 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
277 Please refer to the logs server URL for console logs when possible
278 and use the Jenkins Build URL as a last resort.
281 https://logs.opendaylight.org/$SILO/$JENKINS_HOSTNAME/$JOB_NAME/$BUILD_NUMBER
292 # Installs the openstack cli into a virtualenv at /tmp/v/openstack
293 name: odl-openstack-install
295 - shell: !include-raw: odl-openstack-install.sh
298 name: odl-openstack-check-image-protection
300 - shell: !include-raw: odl-openstack-check-image-protection.sh
303 name: odl-openstack-cleanup-old-images
305 - shell: !include-raw: odl-openstack-cleanup-old-images.sh
308 name: odl-openstack-cleanup-orphaned-nodes
310 - shell: !include-raw: odl-openstack-cleanup-orphaned-nodes.sh
313 name: odl-openstack-cleanup-stale-nodes
315 - shell: !include-raw: odl-openstack-cleanup-stale-nodes.sh
318 name: odl-openstack-cleanup-stale-stacks
320 - shell: !include-raw: odl-openstack-cleanup-stale-stacks.sh
323 name: odl-openstack-cleanup-stale-volumes
325 - shell: !include-raw: odl-openstack-cleanup-stale-volumes.sh
328 # Deploys a maven site to Nexus using lftools nexus-zip command
329 name: opendaylight-infra-deploy-maven-site
331 - lf-provide-maven-settings:
332 global-settings-file: global-settings
333 settings-file: '{settings-file}'
334 - lf-infra-create-netrc:
335 server-id: opendaylight-site
336 - shell: !include-raw-escape:
337 - global-jjb/shell/lftools-install.sh
338 - opendaylight-infra-deploy-maven-site.sh
339 - lf-provide-maven-settings-cleanup
342 name: opendaylight-infra-stack
343 # opendaylight-infra-stack.sh has a required variable {stack-template} that
344 # must be passed into this macro.
346 - shell: !include-raw: opendaylight-infra-stack.sh
347 - shell: !include-raw-escape: opendaylight-infra-copy-ssh-keys.sh
350 name: distribute-build-url
351 # Place URL of the current run of a build job to a file at given path.
355 set +e # DO NOT fail script if command returns non-zero.
357 echo "$BUILD_URL" > {path}/build.url
359 # DO NOT fail the build if the echo failed.
363 name: wipe-org-opendaylight-repo
365 - shell: 'if [ -d /tmp/r/org/opendaylight ]; then rm -rf /tmp/r/org/opendaylight; fi'
368 name: wipe-local-maven-repo
370 - shell: 'if [ -d /tmp/r ]; then rm -rf /tmp/r; fi'
373 name: jacoco-nojava-workaround
375 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
381 application-name: '{application-name}'
384 name: releng-check-unicode
387 $WORKSPACE/scripts/check-unicode.sh jjb/
390 name: provide-maven-settings
392 - config-file-provider:
394 - file-id: '{global-settings-file}'
395 variable: 'GLOBAL_SETTINGS_FILE'
396 - file-id: '{settings-file}'
397 variable: 'SETTINGS_FILE'
400 name: releng-fetch-p2zip-if-necessary
403 # Cleanup any existing zips and metadata before we download the new update site
406 condition-kind: strings-match
407 condition-string1: '$P2ZIP_URL'
408 condition-string2: ''
409 condition-basedir: workspace
411 # TODO: Figure out latest snapshot version number to pull rather than hardcoding 1.1.1-SNAPSHOT
413 maven-version: '{maven-version}'
415 org.apache.maven.plugins:maven-dependency-plugin:get
416 org.apache.maven.plugins:maven-dependency-plugin:copy
418 -Dartifact=org.opendaylight.yangide:org.opendaylight.yangide.update-site:1.1.1-SNAPSHOT:zip
419 -DoutputDirectory=$WORKSPACE
420 settings: '{settings}'
421 global-settings: '{global-settings}'
424 name: releng-generate-p2pom
426 - shell: !include-raw: generate-p2pom.sh
429 name: releng-update-p2composite-metadata
431 - shell: !include-raw: update-p2composite-metadata.sh
433 condition-kind: file-exists
434 condition-filename: deploy-composite-repo.xml
435 condition-basedir: workspace
438 maven-version: '{maven-version}'
439 pom: 'deploy-composite-repo.xml'
440 goals: 'clean deploy -V -B -Dmaven.repo.local=/tmp/r'
441 settings: '{settings}'
442 global-settings: '{global-settings}'
445 name: releng-openstack-stack-delete
458 echo "Deleting $STACK_NAME"
459 openstack stack delete --yes "$STACK_NAME"
460 mark-unstable-if-failed: false
463 name: releng-stage-release
465 - shell: !include-raw: stage-release.sh
468 # This wrapper is required for all jobs as it configures the wrappers
469 # needed by OpenDaylight infra.
470 name: opendaylight-infra-wrappers
473 - config-file-provider:
476 target: '$HOME/.npmrc'
478 target: '$HOME/.config/pip/pip.conf'
479 - file-id: clouds-yaml
480 target: '$HOME/.config/openstack/clouds.yaml'
483 timeout: '{build-timeout}'
484 timeout-var: 'BUILD_TIMEOUT'
487 - ssh-agent-credentials:
489 - 'opendaylight-jenkins-ssh'
494 name: opendaylight-infra-generate-csit-status-report
506 - shell: !include-raw: generate-csit-status-report.sh
507 mark-unstable-if-failed: true