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}'
129 # Used only by opflex-verify-{stream} and {project-name}-verify-{stream}-{maven}-{jdks}
131 name: gerrit-trigger-patch-submitted
134 server-name: 'OpenDaylight'
136 - patchset-created-event:
137 exclude-drafts: 'true'
138 exclude-trivial-rebase: 'false'
139 exclude-no-code-change: 'true'
140 - draft-published-event
141 - comment-added-contains-event:
142 comment-contains-value: 'recheck'
143 - comment-added-contains-event:
144 comment-contains-value: 'reverify'
146 - project-compare-type: 'ANT'
147 project-pattern: '{name}'
149 - branch-compare-type: 'ANT'
150 branch-pattern: '**/{branch}'
153 name: gerrit-trigger-patch-merged
156 server-name: 'OpenDaylight'
158 - change-merged-event
159 - comment-added-contains-event:
160 comment-contains-value: 'remerge'
162 - project-compare-type: 'ANT'
163 project-pattern: '{name}'
165 - branch-compare-type: 'ANT'
166 branch-pattern: '**/{branch}'
172 # Force Jenkins always vote the values it should already have voted
173 # during the prior verify phase
175 gerrit-build-started-verified-value: 1
176 gerrit-build-successful-verified-value: 1
177 gerrit-build-failed-verified-value: 1
178 gerrit-build-unstable-verified-value: 1
179 gerrit-build-notbuilt-verified-value: 1
180 gerrit-build-started-codereview-value: 0
181 gerrit-build-successful-codereview-value: 0
182 gerrit-build-failed-codereview-value: 0
183 gerrit-build-unstable-codereview-value: 0
184 gerrit-build-notbuilt-codereview-value: 0
187 name: gerrit-trigger-patch-sonar
190 server-name: 'OpenDaylight'
192 - comment-added-contains-event:
193 comment-contains-value: 'run-sonar'
195 - project-compare-type: 'ANT'
196 project-pattern: '{name}'
198 - branch-compare-type: 'ANT'
199 branch-pattern: '**/master'
207 name: archive-artifacts
210 artifacts: '{artifacts}'
216 name: email-notification
219 recipients: '{email-recipients}'
221 content-type: default
222 subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
224 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
226 Check console output at $BUILD_URL to view the results.
236 exec-pattern: "**/**.exec"
237 class-pattern: "**/classes"
238 source-pattern: "**/src/main/java"
239 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
250 name: opendaylight-infra-shiplogs
251 # To archive things the job will need to create a "archives" directory in
252 # the workspace and this macro will handle copying the contents of the
253 # archives directory.
255 # Uses the build parameter ARCHIVE_ARTIFACTS if not empty to find files
256 # to archive. You can pass globstar patterns for example "**/*.xml **/*.log"
257 # as the archive pattern. This is a space separated list of files to archive.
259 # Also ensure that the workspace is cleaned up at the end of the build.
263 - shell: !include-raw: include-raw-deploy-archives.sh
265 maven-version: '{maven-version}'
266 pom: '.archives/deploy-archives.xml'
267 goals: 'clean deploy -V -B -q -Dmaven.repo.local=/tmp/r'
268 settings: 'jenkins-log-archives-settings'
270 global-settings: 'odl-global-settings'
271 global-settings-type: cfp
272 - description-setter:
273 regexp: '^Build logs: .*'
274 # Cleanup after ourselves
275 - wipe-org-opendaylight-repo
276 script-only-if-succeeded: False
277 script-only-if-failed: False
278 mark-unstable-if-failed: True
281 # Do not clean up *.jenkins-trigger files for jobs that use a
282 # properties file as input for triggering another build.
283 - '**/*.jenkins-trigger'
287 name: wipe-org-opendaylight-repo
289 - shell: 'if [ -d /tmp/r/org/opendaylight ]; then rm -rf /tmp/r/org/opendaylight; fi'
292 name: wipe-local-maven-repo
294 - shell: 'if [ -d /tmp/r ]; then rm -rf /tmp/r; fi'
297 name: jacoco-nojava-workaround
299 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
305 application-name: '{application-name}'
308 name: releng-check-unicode
311 $WORKSPACE/scripts/check-unicode.sh jjb/
314 name: provide-maven-settings
316 - config-file-provider:
318 - file-id: '{global-settings-file}'
319 variable: 'GLOBAL_SETTINGS_FILE'
320 - file-id: '{settings-file}'
321 variable: 'SETTINGS_FILE'
324 name: releng-fetch-p2zip-if-necessary
327 # Cleanup any existing zips and metadata before we download the new update site
330 condition-kind: strings-match
331 condition-string1: '$P2ZIP_URL'
332 condition-string2: ''
333 condition-basedir: workspace
335 # TODO: Figure out latest snapshot version number to pull rather than hardcoding 1.1.1-SNAPSHOT
337 maven-version: '{maven-version}'
338 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'
339 settings: '{settings}'
340 global-settings: '{global-settings}'
343 name: releng-generate-p2pom
345 - shell: !include-raw: include-raw-generate-p2pom.sh
348 name: releng-update-p2composite-metadata
350 - shell: !include-raw: include-raw-update-p2composite-metadata.sh
352 condition-kind: file-exists
353 condition-filename: deploy-composite-repo.xml
354 condition-basedir: workspace
357 maven-version: '{maven-version}'
358 pom: 'deploy-composite-repo.xml'
359 goals: 'clean deploy -V -B -Dmaven.repo.local=/tmp/r'
360 settings: '{settings}'
361 global-settings: '{global-settings}'
364 name: releng-stage-release
366 - shell: !include-raw: include-raw-stage-release.sh
369 # This wrapper is required for all jobs as it configures the wrappers
370 # needed by OpenDaylight infra.
371 name: opendaylight-infra-wrappers
375 timeout: '{build-timeout}'
376 timeout-var: 'BUILD_TIMEOUT'
379 - ssh-agent-credentials:
381 - 'opendaylight-jenkins-ssh'
388 name: packer-validate
390 - config-file-provider:
392 - file-id: 'packer-cloud-env'
396 export PACKER_LOG="yes" && \
397 export PACKER_LOG_PATH="packer-validate.log" && \
398 packer.io validate -var-file=$CLOUDENV \
399 -var-file=../packer/vars/{platform}.json \
400 ../packer/templates/{template}.json
407 export PACKER_LOG="yes" && \
408 export PACKER_LOG_PATH="packer-build.log" && \
409 packer.io build -var-file=$CLOUDENV \
410 -var-file=../packer/vars/{platform}.json \
411 ../packer/templates/{template}.json