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'
79 credentials-id: 'opendaylight-jenkins-ssh'
88 name: git-scm-with-submodules
91 credentials-id: 'opendaylight-jenkins-ssh'
95 - 'refs/heads/{branch}'
102 name: gerrit-trigger-scm
105 credentials-id: 'opendaylight-jenkins-ssh'
109 - 'origin/$GERRIT_BRANCH'
111 choosing-strategy: '{choosing-strategy}'
122 name: gerrit-trigger-patch-submitted
125 server-name: 'OpenDaylight'
127 - patchset-created-event:
128 exclude-drafts: 'false'
129 exclude-trivial-rebase: 'false'
130 exclude-no-code-change: 'false'
131 - draft-published-event
132 - comment-added-contains-event:
133 comment-contains-value: 'recheck'
134 - comment-added-contains-event:
135 comment-contains-value: 'reverify'
137 - project-compare-type: 'ANT'
138 project-pattern: '{name}'
140 - branch-compare-type: 'ANT'
141 branch-pattern: '**/{branch}'
144 name: gerrit-trigger-relevant-patch-submitted
147 server-name: 'OpenDaylight'
149 - patchset-created-event:
150 exclude-drafts: 'true'
151 exclude-trivial-rebase: 'false'
152 exclude-no-code-change: 'true'
153 - draft-published-event
154 - comment-added-contains-event:
155 comment-contains-value: 'recheck'
156 - comment-added-contains-event:
157 comment-contains-value: 'reverify'
159 - project-compare-type: 'ANT'
160 project-pattern: '{name}'
162 - branch-compare-type: 'ANT'
163 branch-pattern: '**/{branch}'
166 name: gerrit-trigger-patch-merged
169 server-name: 'OpenDaylight'
171 - change-merged-event
172 - comment-added-contains-event:
173 comment-contains-value: 'remerge'
175 - project-compare-type: 'ANT'
176 project-pattern: '{name}'
178 - branch-compare-type: 'ANT'
179 branch-pattern: '**/{branch}'
182 name: gerrit-trigger-patch-sonar
185 server-name: 'OpenDaylight'
187 - comment-added-contains-event:
188 comment-contains-value: 'run-sonar'
190 - project-compare-type: 'ANT'
191 project-pattern: '{name}'
193 - branch-compare-type: 'ANT'
194 branch-pattern: '**/master'
202 name: gerrit-trigger-patch-site-merged
205 server-name: 'OpenDaylight'
207 - change-merged-event
208 - comment-added-contains-event:
209 comment-contains-value: 'republish'
211 - project-compare-type: 'ANT'
212 project-pattern: '{name}'
214 - branch-compare-type: 'ANT'
215 branch-pattern: '**/{branch}'
218 name: archive-artifacts
221 artifacts: '{artifacts}'
227 name: email-notification
230 recipients: 'jenkins@lists.opendaylight.org'
232 content-type: default
233 subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
235 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
237 Check console output at $BUILD_URL to view the results.
247 exec-pattern: "**/**.exec"
248 class-pattern: "**/classes"
249 source-pattern: "**/src/main/java"
250 exclusion-pattern: "**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**"
261 name: opendaylight-infra-shiplogs
262 # To archive things the job will need to create a "archives" directory in
263 # the workspace and this macro will handle copying the contents of the
264 # archives directory.
266 # Uses the build parameter ARCHIVE_ARTIFACTS if not empty to find files
267 # to archive. You can pass globstar patterns for example "**/*.xml **/*.log"
268 # as the archive pattern. This is a space separated list of files to archive.
270 # Also ensure that the workspace is cleaned up at the end of the build.
274 - shell: !include-raw: include-raw-deploy-archives.sh
276 maven-version: '{maven-version}'
277 pom: '.archives/deploy-archives.xml'
278 goals: 'clean deploy -V -B -q -Dmaven.repo.local=/tmp/r'
279 settings: 'jenkins-log-archives-settings'
281 global-settings: 'odl-global-settings'
282 global-settings-type: cfp
283 - description-setter:
284 regexp: '^Build logs: .*'
285 # Cleanup after ourselves
286 - wipe-org-opendaylight-repo
287 script-only-if-succeeded: False
288 script-only-if-failed: False
289 mark-unstable-if-failed: True
294 name: opendaylight-infra-pre-builders
297 if [ ! -z "$GERRIT_PATCHSET_REVISION" ]; then
300 https://logs.opendaylight.org/$SILO/$JENKINS_HOSTNAME/$JOB_NAME/$BUILD_NUMBER
301 (note that logs will be unavailable until the job is completed running.)
303 ssh -p 29418 jenkins-$SILO@git.opendaylight.org gerrit review -m \"${LOG_MESSAGE}\" $GERRIT_PATCHSET_REVISION
307 name: wipe-org-opendaylight-repo
309 - shell: 'if [ -d /tmp/r/org/opendaylight ]; then rm -rf /tmp/r/org/opendaylight; fi'
312 name: wipe-local-maven-repo
314 - shell: 'if [ -d /tmp/r ]; then rm -rf /tmp/r; fi'
317 name: jacoco-nojava-workaround
319 - shell: 'mkdir -p $WORKSPACE/target/classes $WORKSPACE/jacoco/classes'
325 application-name: '{application-name}'
328 name: releng-check-unicode
331 $WORKSPACE/scripts/check-unicode.sh jjb/
334 name: provide-maven-settings
336 - config-file-provider:
338 - file-id: '{global-settings-file}'
339 variable: 'GLOBAL_SETTINGS_FILE'
340 - file-id: '{settings-file}'
341 variable: 'SETTINGS_FILE'
344 name: releng-fetch-p2zip-if-necessary
347 # Cleanup any existing zips and metadata before we download the new update site
350 condition-kind: strings-match
351 condition-string1: '$P2ZIP_URL'
352 condition-string2: ''
353 condition-basedir: workspace
355 # TODO: Figure out latest snapshot version number to pull rather than hardcoding 1.1.1-SNAPSHOT
357 maven-version: '{maven-version}'
358 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'
359 settings: '{settings}'
360 global-settings: '{global-settings}'
363 name: releng-generate-p2pom
365 - shell: !include-raw: include-raw-generate-p2pom.sh
368 name: releng-update-p2composite-metadata
370 - shell: !include-raw: include-raw-update-p2composite-metadata.sh
372 condition-kind: file-exists
373 condition-filename: deploy-composite-repo.xml
374 condition-basedir: workspace
377 maven-version: '{maven-version}'
378 pom: 'deploy-composite-repo.xml'
379 goals: 'clean deploy -V -B -Dmaven.repo.local=/tmp/r'
380 settings: '{settings}'
381 global-settings: '{global-settings}'
384 name: releng-stage-release
386 - shell: !include-raw: include-raw-stage-release.sh
389 # This wrapper is required for all jobs as it configures the wrappers
390 # needed by OpenDaylight infra.
391 name: opendaylight-infra-wrappers
395 timeout: '{build-timeout}'
396 timeout-var: 'BUILD_TIMEOUT'
398 - ssh-agent-credentials:
400 - 'opendaylight-jenkins-ssh'