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
252 # Installs the openstack cli into a virtualenv at /tmp/v/openstack
253 name: odl-openstack-install
255 - shell: !include-raw: odl-openstack-install.sh
258 name: odl-openstack-check-image-protection
260 - shell: !include-raw: odl-openstack-check-image-protection.sh
263 name: odl-openstack-cleanup-old-images
265 - shell: !include-raw: odl-openstack-cleanup-old-images.sh
268 name: odl-openstack-cleanup-orphaned-nodes
270 - shell: !include-raw: odl-openstack-cleanup-orphaned-nodes.sh
273 name: odl-openstack-cleanup-stale-nodes
275 - shell: !include-raw: odl-openstack-cleanup-stale-nodes.sh
278 name: odl-openstack-cleanup-stale-stacks
280 - shell: !include-raw: odl-openstack-cleanup-stale-stacks.sh
283 name: odl-openstack-cleanup-stale-volumes
285 - shell: !include-raw: odl-openstack-cleanup-stale-volumes.sh
288 # Deploys a maven site to Nexus using lftools nexus-zip command
289 name: opendaylight-infra-deploy-maven-site
291 - lf-provide-maven-settings:
292 global-settings-file: global-settings
293 settings-file: '{settings-file}'
294 - lf-infra-create-netrc:
295 server-id: opendaylight-site
296 - shell: !include-raw-escape:
297 - global-jjb/shell/lftools-install.sh
298 - opendaylight-infra-deploy-maven-site.sh
299 - lf-provide-maven-settings-cleanup
302 name: opendaylight-infra-stack
303 # opendaylight-infra-stack.sh has a required variable {stack-template} that
304 # must be passed into this macro.
306 - shell: !include-raw: opendaylight-infra-stack.sh
307 - shell: !include-raw-escape: opendaylight-infra-copy-ssh-keys.sh
310 name: opendaylight-apex-stack
311 # opendaylight-apex-stack.sh has a required variable {stack-template} that
312 # must be passed into this macro.
314 - shell: !include-raw: opendaylight-infra-stack.sh
317 name: distribute-build-url
318 # Place URL of the current run of a build job to a file at given path.
322 set +e # DO NOT fail script if command returns non-zero.
324 echo "$BUILD_URL" > {path}/build.url
326 # DO NOT fail the build if the echo failed.
330 name: wipe-org-opendaylight-repo
332 - shell: 'if [ -d /tmp/r/org/opendaylight ]; then rm -rf /tmp/r/org/opendaylight; fi'
335 name: wipe-local-maven-repo
337 - shell: 'if [ -d /tmp/r ]; then rm -rf /tmp/r; fi'
340 name: jacoco-nojava-workaround
342 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
345 name: provide-maven-settings
347 - config-file-provider:
349 - file-id: '{global-settings-file}'
350 variable: 'GLOBAL_SETTINGS_FILE'
351 - file-id: '{settings-file}'
352 variable: 'SETTINGS_FILE'
355 name: releng-openstack-stack-delete
368 echo "Deleting $STACK_NAME"
369 openstack stack delete --yes "$STACK_NAME"
370 mark-unstable-if-failed: false
373 # This wrapper is required for all jobs as it configures the wrappers
374 # needed by OpenDaylight infra.
375 name: opendaylight-infra-wrappers
378 - config-file-provider:
381 target: '$HOME/.npmrc'
383 target: '$HOME/.config/pip/pip.conf'
384 - file-id: clouds-yaml
385 target: '$HOME/.config/openstack/clouds.yaml'
388 timeout: '{build-timeout}'
389 timeout-var: 'BUILD_TIMEOUT'
392 - ssh-agent-credentials:
394 - 'opendaylight-jenkins-ssh'
399 name: opendaylight-infra-generate-csit-status-report
411 - shell: !include-raw: generate-csit-status-report.sh
412 mark-unstable-if-failed: true