4 name: opendaylight-infra-parameters
9 description: 'Parameter to identify an ODL Gerrit project'
11 name: ARCHIVE_ARTIFACTS
12 default: '{artifacts} **/target/surefire-reports/*-output.txt'
13 description: 'Space separated glob patterns for artifacts to archive into logs.opendaylight.org'
17 description: "GERRIT_PROJECT parameter if not given by trigger"
21 description: "JJB configured GERRIT_BRANCH parameter"
25 description: "GERRIT_REFSPEC parameter if not given by trigger"
33 description: 'Tag in Git to checkout'
36 name: controller-version-parameter
40 default: '{odl_version}'
41 description: 'Controller version (for use with openstacks networking_odl project)'
44 name: patches-to-build-parameter
47 name: PATCHES_TO_BUILD
49 description: 'csv list of patches in project:changeset format to build distribution with'
52 name: distribution-branch-to-build-parameter
55 name: DISTRIBUTION_BRANCH_TO_BUILD
57 description: 'distribution repo branch to build with'
65 description: 'Nexus staging profile id'
68 name: stage-id-parameter
71 name: STAGING_PROFILE_ID
73 description: 'Nexus staging profile id'
80 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn'
81 description: 'Maven selector to be used by shell scripts'
87 credentials-id: 'opendaylight-jenkins-ssh'
96 name: git-scm-with-submodules
99 credentials-id: 'opendaylight-jenkins-ssh'
103 - 'refs/heads/{branch}'
110 name: gerrit-trigger-scm
113 credentials-id: 'opendaylight-jenkins-ssh'
117 - 'origin/$GERRIT_BRANCH'
119 choosing-strategy: '{choosing-strategy}'
130 name: gerrit-trigger-patch-submitted
133 server-name: 'OpenDaylight'
135 - patchset-created-event:
136 exclude-drafts: 'false'
137 exclude-trivial-rebase: 'false'
138 exclude-no-code-change: 'false'
139 - draft-published-event
140 - comment-added-contains-event:
141 comment-contains-value: 'recheck'
142 - comment-added-contains-event:
143 comment-contains-value: 'reverify'
145 - project-compare-type: 'ANT'
146 project-pattern: '{name}'
148 - branch-compare-type: 'ANT'
149 branch-pattern: '**/{branch}'
152 name: gerrit-trigger-relevant-patch-submitted
155 server-name: 'OpenDaylight'
157 - patchset-created-event:
158 exclude-drafts: 'true'
159 exclude-trivial-rebase: 'false'
160 exclude-no-code-change: 'true'
161 - draft-published-event
162 - comment-added-contains-event:
163 comment-contains-value: 'recheck'
164 - comment-added-contains-event:
165 comment-contains-value: 'reverify'
167 - project-compare-type: 'ANT'
168 project-pattern: '{name}'
170 - branch-compare-type: 'ANT'
171 branch-pattern: '**/{branch}'
174 name: gerrit-trigger-patch-merged
177 server-name: 'OpenDaylight'
179 - change-merged-event
180 - comment-added-contains-event:
181 comment-contains-value: 'remerge'
183 - project-compare-type: 'ANT'
184 project-pattern: '{name}'
186 - branch-compare-type: 'ANT'
187 branch-pattern: '**/{branch}'
193 # Force Jenkins always vote the values it should already have voted
194 # during the prior verify phase
196 gerrit-build-started-verified-value: 1
197 gerrit-build-successful-verified-value: 1
198 gerrit-build-failed-verified-value: 1
199 gerrit-build-unstable-verified-value: 1
200 gerrit-build-notbuilt-verified-value: 1
201 gerrit-build-started-codereview-value: 0
202 gerrit-build-successful-codereview-value: 0
203 gerrit-build-failed-codereview-value: 0
204 gerrit-build-unstable-codereview-value: 0
205 gerrit-build-notbuilt-codereview-value: 0
208 name: gerrit-trigger-patch-sonar
211 server-name: 'OpenDaylight'
213 - comment-added-contains-event:
214 comment-contains-value: 'run-sonar'
216 - project-compare-type: 'ANT'
217 project-pattern: '{name}'
219 - branch-compare-type: 'ANT'
220 branch-pattern: '**/master'
228 name: gerrit-trigger-patch-site-merged
231 server-name: 'OpenDaylight'
233 - change-merged-event
234 - comment-added-contains-event:
235 comment-contains-value: 'republish'
237 - project-compare-type: 'ANT'
238 project-pattern: '{name}'
240 - branch-compare-type: 'ANT'
241 branch-pattern: '**/{branch}'
242 # Force Jenkins always vote the values it should already have voted
243 # during the prior verify phase
245 gerrit-build-started-verified-value: 1
246 gerrit-build-successful-verified-value: 1
247 gerrit-build-failed-verified-value: 1
248 gerrit-build-unstable-verified-value: 1
249 gerrit-build-notbuilt-verified-value: 1
250 gerrit-build-started-codereview-value: 0
251 gerrit-build-successful-codereview-value: 0
252 gerrit-build-failed-codereview-value: 0
253 gerrit-build-unstable-codereview-value: 0
254 gerrit-build-notbuilt-codereview-value: 0
257 name: archive-artifacts
260 artifacts: '{artifacts}'
266 name: email-notification
269 recipients: 'jenkins@lists.opendaylight.org'
271 content-type: default
272 subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
274 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
276 Check console output at $BUILD_URL to view the results.
286 exec-pattern: "**/**.exec"
287 class-pattern: "**/classes"
288 source-pattern: "**/src/main/java"
289 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
300 name: opendaylight-infra-shiplogs
301 # To archive things the job will need to create a "archives" directory in
302 # the workspace and this macro will handle copying the contents of the
303 # archives directory.
305 # Uses the build parameter ARCHIVE_ARTIFACTS if not empty to find files
306 # to archive. You can pass globstar patterns for example "**/*.xml **/*.log"
307 # as the archive pattern. This is a space separated list of files to archive.
309 # Also ensure that the workspace is cleaned up at the end of the build.
313 - shell: !include-raw: include-raw-deploy-archives.sh
315 maven-version: '{maven-version}'
316 pom: '.archives/deploy-archives.xml'
317 goals: 'clean deploy -V -B -q -Dmaven.repo.local=/tmp/r'
318 settings: 'jenkins-log-archives-settings'
320 global-settings: 'odl-global-settings'
321 global-settings-type: cfp
322 - description-setter:
323 regexp: '^Build logs: .*'
324 # Cleanup after ourselves
325 - wipe-org-opendaylight-repo
326 script-only-if-succeeded: False
327 script-only-if-failed: False
328 mark-unstable-if-failed: True
331 # Do not clean up *.jenkins-trigger files for jobs that use a
332 # properties file as input for triggering another build.
333 - '**/*.jenkins-trigger'
337 name: wipe-org-opendaylight-repo
339 - shell: 'if [ -d /tmp/r/org/opendaylight ]; then rm -rf /tmp/r/org/opendaylight; fi'
342 name: wipe-local-maven-repo
344 - shell: 'if [ -d /tmp/r ]; then rm -rf /tmp/r; fi'
347 name: jacoco-nojava-workaround
349 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
355 application-name: '{application-name}'
358 name: releng-check-unicode
361 $WORKSPACE/scripts/check-unicode.sh jjb/
364 name: provide-maven-settings
366 - config-file-provider:
368 - file-id: '{global-settings-file}'
369 variable: 'GLOBAL_SETTINGS_FILE'
370 - file-id: '{settings-file}'
371 variable: 'SETTINGS_FILE'
374 name: releng-fetch-p2zip-if-necessary
377 # Cleanup any existing zips and metadata before we download the new update site
380 condition-kind: strings-match
381 condition-string1: '$P2ZIP_URL'
382 condition-string2: ''
383 condition-basedir: workspace
385 # TODO: Figure out latest snapshot version number to pull rather than hardcoding 1.1.1-SNAPSHOT
387 maven-version: '{maven-version}'
388 goals: 'org.apache.maven.plugins:maven-dependency-plugin:get org.apache.maven.plugins:maven-dependency-plugin:copy -V -B -Dartifact=org.opendaylight.yangide:org.opendaylight.yangide.update-site:1.1.1-SNAPSHOT:zip -DoutputDirectory=$WORKSPACE'
389 settings: '{settings}'
390 global-settings: '{global-settings}'
393 name: releng-generate-p2pom
395 - shell: !include-raw: include-raw-generate-p2pom.sh
398 name: releng-update-p2composite-metadata
400 - shell: !include-raw: include-raw-update-p2composite-metadata.sh
402 condition-kind: file-exists
403 condition-filename: deploy-composite-repo.xml
404 condition-basedir: workspace
407 maven-version: '{maven-version}'
408 pom: 'deploy-composite-repo.xml'
409 goals: 'clean deploy -V -B -Dmaven.repo.local=/tmp/r'
410 settings: '{settings}'
411 global-settings: '{global-settings}'
414 name: releng-stage-release
416 - shell: !include-raw: include-raw-stage-release.sh
419 # This wrapper is required for all jobs as it configures the wrappers
420 # needed by OpenDaylight infra.
421 name: opendaylight-infra-wrappers
425 timeout: '{build-timeout}'
426 timeout-var: 'BUILD_TIMEOUT'
429 - ssh-agent-credentials:
431 - 'opendaylight-jenkins-ssh'
438 name: packer-validate
440 - config-file-provider:
442 - file-id: 'packer-cloud-env'
446 export PACKER_LOG="yes" && \
447 export PACKER_LOG_PATH="packer-validate.log" && \
448 packer.io validate -var-file=$CLOUDENV \
449 -var-file=../packer/vars/{platform}.json \
450 ../packer/templates/{template}.json
457 export PACKER_LOG="yes" && \
458 export PACKER_LOG_PATH="packer-build.log" && \
459 packer.io build -var-file=$CLOUDENV \
460 -var-file=../packer/vars/{platform}.json \
461 ../packer/templates/{template}.json