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}'
190 name: gerrit-trigger-patch-sonar
193 server-name: 'OpenDaylight'
195 - comment-added-contains-event:
196 comment-contains-value: 'run-sonar'
198 - project-compare-type: 'ANT'
199 project-pattern: '{name}'
201 - branch-compare-type: 'ANT'
202 branch-pattern: '**/master'
210 name: gerrit-trigger-patch-site-merged
213 server-name: 'OpenDaylight'
215 - change-merged-event
216 - comment-added-contains-event:
217 comment-contains-value: 'republish'
219 - project-compare-type: 'ANT'
220 project-pattern: '{name}'
222 - branch-compare-type: 'ANT'
223 branch-pattern: '**/{branch}'
226 name: archive-artifacts
229 artifacts: '{artifacts}'
235 name: email-notification
238 recipients: 'jenkins@lists.opendaylight.org'
240 content-type: default
241 subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
243 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
245 Check console output at $BUILD_URL to view the results.
255 exec-pattern: "**/**.exec"
256 class-pattern: "**/classes"
257 source-pattern: "**/src/main/java"
258 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
269 name: opendaylight-infra-shiplogs
270 # To archive things the job will need to create a "archives" directory in
271 # the workspace and this macro will handle copying the contents of the
272 # archives directory.
274 # Uses the build parameter ARCHIVE_ARTIFACTS if not empty to find files
275 # to archive. You can pass globstar patterns for example "**/*.xml **/*.log"
276 # as the archive pattern. This is a space separated list of files to archive.
278 # Also ensure that the workspace is cleaned up at the end of the build.
282 - shell: !include-raw: include-raw-deploy-archives.sh
284 maven-version: '{maven-version}'
285 pom: '.archives/deploy-archives.xml'
286 goals: 'clean deploy -V -B -q -Dmaven.repo.local=/tmp/r'
287 settings: 'jenkins-log-archives-settings'
289 global-settings: 'odl-global-settings'
290 global-settings-type: cfp
291 - description-setter:
292 regexp: '^Build logs: .*'
293 # Cleanup after ourselves
294 - wipe-org-opendaylight-repo
295 script-only-if-succeeded: False
296 script-only-if-failed: False
297 mark-unstable-if-failed: True
300 # autorelease-release-{stream} reqires vaiables.prop file to be preserved
301 # as the downstream test jobs fails invoke without automatically
306 name: wipe-org-opendaylight-repo
308 - shell: 'if [ -d /tmp/r/org/opendaylight ]; then rm -rf /tmp/r/org/opendaylight; fi'
311 name: wipe-local-maven-repo
313 - shell: 'if [ -d /tmp/r ]; then rm -rf /tmp/r; fi'
316 name: jacoco-nojava-workaround
318 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
324 application-name: '{application-name}'
327 name: releng-check-unicode
330 $WORKSPACE/scripts/check-unicode.sh jjb/
333 name: provide-maven-settings
335 - config-file-provider:
337 - file-id: '{global-settings-file}'
338 variable: 'GLOBAL_SETTINGS_FILE'
339 - file-id: '{settings-file}'
340 variable: 'SETTINGS_FILE'
343 name: releng-fetch-p2zip-if-necessary
346 # Cleanup any existing zips and metadata before we download the new update site
349 condition-kind: strings-match
350 condition-string1: '$P2ZIP_URL'
351 condition-string2: ''
352 condition-basedir: workspace
354 # TODO: Figure out latest snapshot version number to pull rather than hardcoding 1.1.1-SNAPSHOT
356 maven-version: '{maven-version}'
357 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'
358 settings: '{settings}'
359 global-settings: '{global-settings}'
362 name: releng-generate-p2pom
364 - shell: !include-raw: include-raw-generate-p2pom.sh
367 name: releng-update-p2composite-metadata
369 - shell: !include-raw: include-raw-update-p2composite-metadata.sh
371 condition-kind: file-exists
372 condition-filename: deploy-composite-repo.xml
373 condition-basedir: workspace
376 maven-version: '{maven-version}'
377 pom: 'deploy-composite-repo.xml'
378 goals: 'clean deploy -V -B -Dmaven.repo.local=/tmp/r'
379 settings: '{settings}'
380 global-settings: '{global-settings}'
383 name: releng-stage-release
385 - shell: !include-raw: include-raw-stage-release.sh
388 # This wrapper is required for all jobs as it configures the wrappers
389 # needed by OpenDaylight infra.
390 name: opendaylight-infra-wrappers
394 timeout: '{build-timeout}'
395 timeout-var: 'BUILD_TIMEOUT'
398 - ssh-agent-credentials:
400 - 'opendaylight-jenkins-ssh'
407 name: packer-validate
409 - config-file-provider:
411 - file-id: 'packer-cloud-env'
415 export PACKER_LOG="yes" && \
416 export PACKER_LOG_PATH="packer-validate.log" && \
417 packer.io validate -var-file=$CLOUDENV \
418 -var-file=../packer/vars/{platform}.json \
419 ../packer/templates/{template}.json
426 export PACKER_LOG="yes" && \
427 export PACKER_LOG_PATH="packer-build.log" && \
428 packer.io build -var-file=$CLOUDENV \
429 -var-file=../packer/vars/{platform}.json \
430 ../packer/templates/{template}.json