4 name: opendaylight-infra-properties
7 days-to-keep: '{build-days-to-keep}'
9 # Need to keep artifacts for at least 1 day as some projects need to
10 # be able to validate their artifacts and only allowing limited
11 # number of artifacts could make fast moving jobs lost their
12 # artifacts before the developers can test it.
13 artifact-days-to-keep: 1
16 name: opendaylight-infra-parameters
21 description: 'Parameter to identify an ODL Gerrit project'
23 name: ARCHIVE_ARTIFACTS
24 # Before adding more here, beware of https://jira.linuxfoundation.org/browse/RELENG-280
27 **/target/surefire-reports/*-output.txt
28 **/target/failsafe-reports/failsafe-summary.xml
30 **/target/feature/feature.xml
31 # TODO: **/*.hprof is too large, compress with xz first
32 description: 'Space separated glob patterns for artifacts to archive into logs.opendaylight.org'
36 description: "GERRIT_PROJECT parameter if not given by trigger"
40 description: "JJB configured GERRIT_BRANCH parameter"
45 Gerrit reference to checkout (ex: refs/heads/master,
46 refs/changes/48/61548/1 where 61548 is Gerrit change ID, 1 is
47 patch number and 48 is last two digits of change ID)
50 default: '$SILO-$JOB_NAME-$BUILD_NUMBER'
51 description: "Used by Heat to generate a unique stack & vm name"
56 The name of a cloud configuration in clouds.yaml. OS_CLOUD is a
57 variable name that is significant to openstack client as a
58 environment variable. Please refer to the documentation for
60 https://docs.openstack.org/developer/python-openstackclient/
63 name: distribution-branch-to-build-parameter
66 name: DISTRIBUTION_BRANCH_TO_BUILD
68 description: 'distribution repo branch to build with'
75 default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn'
76 description: 'Maven selector to be used by shell scripts'
82 credentials-id: 'opendaylight-jenkins-ssh'
91 name: git-scm-with-submodules
94 credentials-id: 'opendaylight-jenkins-ssh'
98 - 'refs/heads/{branch}'
105 name: gerrit-trigger-scm
108 credentials-id: 'opendaylight-jenkins-ssh'
112 - 'origin/$GERRIT_BRANCH'
114 choosing-strategy: '{choosing-strategy}'
116 # This is a single macro to use for all jobs who vote on every (relevant) patch set.
117 # Only 'recheck' trigger word is supported, it always triggers the full set of relevant jobs,
118 # in order to prevent Jenkins from starting only a subset and still voting Verified+1.
120 # gerrit-server-name: name of gerrit server to listen to
121 # project: pattern to match triggering projects
122 # branch: triggering branch name
123 # files: pattern to match triggering filepaths
125 name: gerrit-trigger-patch-submitted
128 server-name: '{gerrit-server-name}'
130 - patchset-created-event:
132 exclude-trivial-rebase: false
133 exclude-no-code-change: false
134 - draft-published-event
135 - comment-added-contains-event:
136 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
138 - project-compare-type: ANT
139 project-pattern: '{project}'
141 - branch-compare-type: ANT
142 branch-pattern: '**/{branch}'
146 forbidden-file-paths:
148 pattern: '{forbidden-files}'
150 # TODO: Unify argument names across gerrit-trigger-* macros.
152 name: gerrit-trigger-patch-merged
155 server-name: '{gerrit-server-name}'
157 - change-merged-event
158 - comment-added-contains-event:
159 comment-contains-value: 'remerge$'
161 - project-compare-type: 'ANT'
162 project-pattern: '{name}'
164 - branch-compare-type: 'ANT'
165 branch-pattern: '**/{branch}'
169 forbidden-file-paths:
171 pattern: '{forbidden-files}'
177 # Force Jenkins always vote the values it should already have voted
178 # during the prior verify phase
180 gerrit-build-started-verified-value: 1
181 gerrit-build-successful-verified-value: 1
182 gerrit-build-failed-verified-value: 1
183 gerrit-build-unstable-verified-value: 1
184 gerrit-build-notbuilt-verified-value: 1
185 gerrit-build-started-codereview-value: 0
186 gerrit-build-successful-codereview-value: 0
187 gerrit-build-failed-codereview-value: 0
188 gerrit-build-unstable-codereview-value: 0
189 gerrit-build-notbuilt-codereview-value: 0
192 name: email-notification
195 recipients: '{email-recipients}'
197 content-type: default
198 subject: '{email-prefix} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
200 $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:
202 Please refer to the logs server URL for console logs when possible
203 and use the Jenkins Build URL as a last resort.
206 https://logs.opendaylight.org/$SILO/$JENKINS_HOSTNAME/$JOB_NAME/$BUILD_NUMBER
216 name: opendaylight-infra-stack
217 # opendaylight-infra-stack.sh has a required variable {stack-template} that
218 # must be passed into this macro.
220 - shell: !include-raw: opendaylight-infra-stack.sh
221 - shell: !include-raw-escape: opendaylight-infra-copy-ssh-keys.sh
224 name: opendaylight-apex-stack
225 # opendaylight-apex-stack.sh has a required variable {stack-template} that
226 # must be passed into this macro.
228 - shell: !include-raw: opendaylight-infra-stack.sh
231 name: distribute-build-url
232 # Place URL of the current run of a build job to a file at given path.
236 set +e # DO NOT fail script if command returns non-zero.
238 echo "$BUILD_URL" > {path}/build.url
240 # DO NOT fail the build if the echo failed.
244 name: wipe-org-opendaylight-repo
246 - shell: 'if [ -d /tmp/r/org/opendaylight ]; then rm -rf /tmp/r/org/opendaylight; fi'
249 name: wipe-local-maven-repo
251 - shell: 'if [ -d /tmp/r ]; then rm -rf /tmp/r; fi'
254 # This wrapper is required for all jobs as it configures the wrappers
255 # needed by OpenDaylight infra.
256 name: opendaylight-infra-wrappers
259 - config-file-provider:
262 target: '$HOME/.npmrc'
264 target: '$HOME/.config/pip/pip.conf'
265 - file-id: clouds-yaml
266 target: '$HOME/.config/openstack/clouds.yaml'
269 timeout: '{build-timeout}'
270 timeout-var: 'BUILD_TIMEOUT'
273 - ssh-agent-credentials:
275 - 'opendaylight-jenkins-ssh'
280 name: opendaylight-infra-generate-csit-status-report
292 - shell: !include-raw: generate-csit-status-report.sh
293 mark-unstable-if-failed: true