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 Patches to add to distro in CSV project:changeset format (genius:32/53632/9,netvirt:59/50259/47)
88 name: run-test-parameter
93 description: 'Set true to run test after build'
96 name: distribution-branch-to-build-parameter
99 name: DISTRIBUTION_BRANCH_TO_BUILD
101 description: 'distribution repo branch to build with'
104 name: p2zip-parameter
109 description: 'Nexus staging profile id'
112 name: stage-id-parameter
115 name: STAGING_PROFILE_ID
116 default: '{stage-id}'
117 description: 'Nexus staging profile id'
124 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn'
125 description: 'Maven selector to be used by shell scripts'
131 credentials-id: 'opendaylight-jenkins-ssh'
140 name: git-scm-with-submodules
143 credentials-id: 'opendaylight-jenkins-ssh'
147 - 'refs/heads/{branch}'
154 name: gerrit-trigger-scm
157 credentials-id: 'opendaylight-jenkins-ssh'
161 - 'origin/$GERRIT_BRANCH'
163 choosing-strategy: '{choosing-strategy}'
173 # This is a single macro to use for all jobs who vote on every (relevant) patch set.
174 # Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
175 # in order to prevent Jenkins from starting only a subset and still voting Verified+1.
177 # server: name of gerrit server to listen to
178 # project: pattern to match triggering projects
179 # branch: triggering branch name
180 # files: pattern to match triggering filepaths
182 name: gerrit-trigger-patch-submitted
185 server-name: '{server}'
187 - patchset-created-event:
189 exclude-trivial-rebase: false
190 exclude-no-code-change: false
191 - draft-published-event
192 - comment-added-contains-event:
193 comment-contains-value: recheck
195 - project-compare-type: ANT
196 project-pattern: '{project}'
198 - branch-compare-type: ANT
199 branch-pattern: '**/{branch}'
204 # TODO: Unify argument names across gerrit-trigger-* macros.
206 name: gerrit-trigger-patch-merged
209 server-name: '{server-name}'
211 - change-merged-event
212 - comment-added-contains-event:
213 comment-contains-value: 'remerge'
215 - project-compare-type: 'ANT'
216 project-pattern: '{name}'
218 - branch-compare-type: 'ANT'
219 branch-pattern: '**/{branch}'
225 # Force Jenkins always vote the values it should already have voted
226 # during the prior verify phase
228 gerrit-build-started-verified-value: 1
229 gerrit-build-successful-verified-value: 1
230 gerrit-build-failed-verified-value: 1
231 gerrit-build-unstable-verified-value: 1
232 gerrit-build-notbuilt-verified-value: 1
233 gerrit-build-started-codereview-value: 0
234 gerrit-build-successful-codereview-value: 0
235 gerrit-build-failed-codereview-value: 0
236 gerrit-build-unstable-codereview-value: 0
237 gerrit-build-notbuilt-codereview-value: 0
239 # TODO: Unify argument names across gerrit-trigger-* macros.
241 name: gerrit-trigger-patch-sonar
244 server-name: '{server-name}'
246 - comment-added-contains-event:
247 comment-contains-value: 'run-sonar'
249 - project-compare-type: 'ANT'
250 project-pattern: '{name}'
252 - branch-compare-type: 'ANT'
253 branch-pattern: '**/master'
261 name: email-notification
264 recipients: '{email-recipients}'
266 content-type: default
267 subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
269 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
271 Please refer to the logs server URL for console logs when possible
272 and use the Jenkins Build URL as a last resort.
275 https://logs.opendaylight.org/$SILO/$JENKINS_HOSTNAME/$JOB_NAME/$BUILD_NUMBER
288 exec-pattern: "**/**.exec"
289 class-pattern: "**/classes"
290 source-pattern: "**/src/main/java"
291 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
302 # Deploys a maven site to Nexus using lftools nexus-zip command
303 name: opendaylight-infra-deploy-maven-site
305 - lf-provide-maven-settings:
306 global-settings-file: global-settings
307 settings-file: '{settings-file}'
308 - lf-infra-create-netrc:
309 server-id: opendaylight-site
310 - shell: !include-raw-escape:
311 - global-jjb/shell/lftools-install.sh
312 - opendaylight-infra-deploy-maven-site.sh
313 - lf-provide-maven-settings-cleanup
316 name: opendaylight-infra-stack
317 # opendaylight-infra-stack.sh has a required variable {stack-template} that
318 # must be passed into this macro.
320 - shell: !include-raw: opendaylight-infra-stack.sh
321 - shell: !include-raw-escape: opendaylight-infra-copy-ssh-keys.sh
324 name: opendaylight-infra-push-gerrit-patch
325 # opendaylight-infra-push-gerrit-patch.sh allows a job to push a patch to
326 # Gerrit in an automated fashion. This is meant for tasks that creates
327 # the same patch regularly and needs the ability to detect if an unreviewed
328 # patch already exists. In which case it will update the existing patch.
330 # Note: This patch assumes the $WORKSPACE contains the project repo with
331 # the files changed already "git add" and waiting for a "git commit" call.
333 # This script requires the following JJB variables to be passed in:
334 # {project} Gerrit project-name
335 # {gerrit-topic} Gerrit topic, please make a unique topic.
336 # {gerrit-commit-message} Commit message to assign to commit.
337 # NOTE: Requires git review to be installed on node.
339 - shell: !include-raw: opendaylight-infra-push-gerrit-patch.sh
342 name: distribute-build-url
343 # Place URL of the current run of a build job to a file at given path.
347 set +e # DO NOT fail script if command returns non-zero.
349 echo "$BUILD_URL" > {path}/build.url
351 # DO NOT fail the build if the echo failed.
355 name: wipe-org-opendaylight-repo
357 - shell: 'if [ -d /tmp/r/org/opendaylight ]; then rm -rf /tmp/r/org/opendaylight; fi'
360 name: wipe-local-maven-repo
362 - shell: 'if [ -d /tmp/r ]; then rm -rf /tmp/r; fi'
365 name: jacoco-nojava-workaround
367 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
373 application-name: '{application-name}'
376 name: releng-check-unicode
379 $WORKSPACE/scripts/check-unicode.sh jjb/
382 name: provide-maven-settings
384 - config-file-provider:
386 - file-id: '{global-settings-file}'
387 variable: 'GLOBAL_SETTINGS_FILE'
388 - file-id: '{settings-file}'
389 variable: 'SETTINGS_FILE'
392 name: releng-fetch-p2zip-if-necessary
395 # Cleanup any existing zips and metadata before we download the new update site
398 condition-kind: strings-match
399 condition-string1: '$P2ZIP_URL'
400 condition-string2: ''
401 condition-basedir: workspace
403 # TODO: Figure out latest snapshot version number to pull rather than hardcoding 1.1.1-SNAPSHOT
405 maven-version: '{maven-version}'
407 org.apache.maven.plugins:maven-dependency-plugin:get
408 org.apache.maven.plugins:maven-dependency-plugin:copy
410 -Dartifact=org.opendaylight.yangide:org.opendaylight.yangide.update-site:1.1.1-SNAPSHOT:zip
411 -DoutputDirectory=$WORKSPACE
412 settings: '{settings}'
413 global-settings: '{global-settings}'
416 name: releng-generate-p2pom
418 - shell: !include-raw: generate-p2pom.sh
421 name: releng-update-p2composite-metadata
423 - shell: !include-raw: update-p2composite-metadata.sh
425 condition-kind: file-exists
426 condition-filename: deploy-composite-repo.xml
427 condition-basedir: workspace
430 maven-version: '{maven-version}'
431 pom: 'deploy-composite-repo.xml'
432 goals: 'clean deploy -V -B -Dmaven.repo.local=/tmp/r'
433 settings: '{settings}'
434 global-settings: '{global-settings}'
437 name: releng-stage-release
439 - shell: !include-raw: stage-release.sh
442 # This wrapper is required for all jobs as it configures the wrappers
443 # needed by OpenDaylight infra.
444 name: opendaylight-infra-wrappers
447 - config-file-provider:
450 target: '$HOME/.npmrc'
451 - file-id: rackspace-heat
452 target: '$HOME/.config/openstack/clouds.yaml'
455 timeout: '{build-timeout}'
456 timeout-var: 'BUILD_TIMEOUT'
459 - ssh-agent-credentials:
461 - 'opendaylight-jenkins-ssh'
466 # TODO: Verify signature after downloading users public key from a locally created
467 # repository instead of the public keymesh. This requires a process in place to get ODL
468 # developers public keys into a local repository without increasing the job thoughput.
469 name: verify-gpg-signature
471 - shell: !include-raw: verify-gpg-signatures.sh
474 name: opendaylight-infra-jjbini
476 - config-file-provider:
479 target: '$HOME/.config/jenkins_jobs/jenkins_jobs.ini'
482 name: opendaylight-infra-generate-csit-status-report
486 - shell: !include-raw: generate-csit-status-report.sh
487 script-only-if-succeeded: false
488 script-only-if-failed: false
489 mark-unstable-if-failed: false