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}'
195 name: gerrit-trigger-patch-sonar
198 server-name: 'OpenDaylight'
200 - comment-added-contains-event:
201 comment-contains-value: 'run-sonar'
203 - project-compare-type: 'ANT'
204 project-pattern: '{name}'
206 - branch-compare-type: 'ANT'
207 branch-pattern: '**/master'
215 name: gerrit-trigger-patch-site-merged
218 server-name: 'OpenDaylight'
220 - change-merged-event
221 - comment-added-contains-event:
222 comment-contains-value: 'republish'
224 - project-compare-type: 'ANT'
225 project-pattern: '{name}'
227 - branch-compare-type: 'ANT'
228 branch-pattern: '**/{branch}'
231 name: archive-artifacts
234 artifacts: '{artifacts}'
240 name: email-notification
243 recipients: 'jenkins@lists.opendaylight.org'
245 content-type: default
246 subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
248 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
250 Check console output at $BUILD_URL to view the results.
260 exec-pattern: "**/**.exec"
261 class-pattern: "**/classes"
262 source-pattern: "**/src/main/java"
263 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
274 name: opendaylight-infra-shiplogs
275 # To archive things the job will need to create a "archives" directory in
276 # the workspace and this macro will handle copying the contents of the
277 # archives directory.
279 # Uses the build parameter ARCHIVE_ARTIFACTS if not empty to find files
280 # to archive. You can pass globstar patterns for example "**/*.xml **/*.log"
281 # as the archive pattern. This is a space separated list of files to archive.
283 # Also ensure that the workspace is cleaned up at the end of the build.
287 - shell: !include-raw: include-raw-deploy-archives.sh
289 maven-version: '{maven-version}'
290 pom: '.archives/deploy-archives.xml'
291 goals: 'clean deploy -V -B -q -Dmaven.repo.local=/tmp/r'
292 settings: 'jenkins-log-archives-settings'
294 global-settings: 'odl-global-settings'
295 global-settings-type: cfp
296 - description-setter:
297 regexp: '^Build logs: .*'
298 # Cleanup after ourselves
299 - wipe-org-opendaylight-repo
300 script-only-if-succeeded: False
301 script-only-if-failed: False
302 mark-unstable-if-failed: True
305 # Do not clean up *.jenkins-trigger files for jobs that use a
306 # properties file as input for triggering another build.
307 - '**/*.jenkins-trigger'
311 name: wipe-org-opendaylight-repo
313 - shell: 'if [ -d /tmp/r/org/opendaylight ]; then rm -rf /tmp/r/org/opendaylight; fi'
316 name: wipe-local-maven-repo
318 - shell: 'if [ -d /tmp/r ]; then rm -rf /tmp/r; fi'
321 name: jacoco-nojava-workaround
323 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
329 application-name: '{application-name}'
332 name: releng-check-unicode
335 $WORKSPACE/scripts/check-unicode.sh jjb/
338 name: provide-maven-settings
340 - config-file-provider:
342 - file-id: '{global-settings-file}'
343 variable: 'GLOBAL_SETTINGS_FILE'
344 - file-id: '{settings-file}'
345 variable: 'SETTINGS_FILE'
348 name: releng-fetch-p2zip-if-necessary
351 # Cleanup any existing zips and metadata before we download the new update site
354 condition-kind: strings-match
355 condition-string1: '$P2ZIP_URL'
356 condition-string2: ''
357 condition-basedir: workspace
359 # TODO: Figure out latest snapshot version number to pull rather than hardcoding 1.1.1-SNAPSHOT
361 maven-version: '{maven-version}'
362 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'
363 settings: '{settings}'
364 global-settings: '{global-settings}'
367 name: releng-generate-p2pom
369 - shell: !include-raw: include-raw-generate-p2pom.sh
372 name: releng-update-p2composite-metadata
374 - shell: !include-raw: include-raw-update-p2composite-metadata.sh
376 condition-kind: file-exists
377 condition-filename: deploy-composite-repo.xml
378 condition-basedir: workspace
381 maven-version: '{maven-version}'
382 pom: 'deploy-composite-repo.xml'
383 goals: 'clean deploy -V -B -Dmaven.repo.local=/tmp/r'
384 settings: '{settings}'
385 global-settings: '{global-settings}'
388 name: releng-stage-release
390 - shell: !include-raw: include-raw-stage-release.sh
393 # This wrapper is required for all jobs as it configures the wrappers
394 # needed by OpenDaylight infra.
395 name: opendaylight-infra-wrappers
399 timeout: '{build-timeout}'
400 timeout-var: 'BUILD_TIMEOUT'
403 - ssh-agent-credentials:
405 - 'opendaylight-jenkins-ssh'
412 name: packer-validate
414 - config-file-provider:
416 - file-id: 'packer-cloud-env'
420 export PACKER_LOG="yes" && \
421 export PACKER_LOG_PATH="packer-validate.log" && \
422 packer.io validate -var-file=$CLOUDENV \
423 -var-file=../packer/vars/{platform}.json \
424 ../packer/templates/{template}.json
431 export PACKER_LOG="yes" && \
432 export PACKER_LOG_PATH="packer-build.log" && \
433 packer.io build -var-file=$CLOUDENV \
434 -var-file=../packer/vars/{platform}.json \
435 ../packer/templates/{template}.json