Merge "Revert "Install odl-mdsal-trace in netvirt oxygen csit""
[releng/builder.git] / jjb / autorelease / autorelease-templates.yaml
1 ---
2 # Autorelease build jobs
3 - job-template:
4     name: autorelease-branch-cut
5
6     #####################
7     # Job Configuration #
8     #####################
9
10     project-type: freestyle
11     node: centos7-builder-2c-2g
12
13     properties:
14       - opendaylight-infra-properties:
15           build-days-to-keep: 7
16
17     parameters:
18       - lf-infra-parameters:
19           project: releng/autorelease
20           branch: master
21           stream: master
22           lftools-version: '{lftools-version}'
23       - string:
24           name: RELEASE
25           description: |
26               Release name to branch cut.
27               Eg. Lithium, Beryllium, Boron, Carbon...
28       - bool:
29           name: DRY_RUN
30           default: true
31           description: |
32               If DRY_RUN is enabled modifications are not published to Gerrit.
33
34     scm:
35       - lf-infra-gerrit-scm:
36           git-url: '$GIT_URL/$GERRIT_PROJECT'
37           branch: master
38           refspec: 'refs/heads/master'
39           jenkins-ssh-credential: opendaylight-jenkins-ssh
40           submodule-recursive: true
41           choosing-strategy: default
42
43     wrappers:
44       - lf-infra-wrappers:
45           build-timeout: 10
46           jenkins-ssh-credential: opendaylight-jenkins-ssh
47
48     builders:
49       - shell: !include-raw-escape: branch-cut.sh
50
51     publishers:
52       - lf-infra-publish
53
54 - job-template:
55     name: 'autorelease-release-{stream}'
56
57     ############
58     # Defaults #
59     ############
60
61     build-node: '{build-node}'
62     java-version: openjdk8
63     mvn-version: mvn33
64     extra-mvn-opts: ''
65
66     #####################
67     # Job Configuration #
68     #####################
69
70     project-type: freestyle
71     node: '{build-node}'
72     jdk: '{java-version}'
73     cron: 'H 0 * * *'
74
75     properties:
76       - lf-infra-properties:
77           build-days-to-keep: 30
78
79     parameters:
80       - maven-exec:
81           maven-version: 'mvn33'
82       - lf-infra-parameters:
83           project: '{project}'
84           stream: '{stream}'
85           branch: '{branch}'
86           lftools-version: '{lftools-version}'
87       - distribution-karaf-version:
88           karaf-version: '{karaf-version}'
89       - autorelease-release-tag:
90           release-tag: '{next-release-tag}'
91       - string:
92           name: EXTRA_MVN_OPTS
93           default: '{extra-mvn-opts}'
94           description: |
95               Additional optional Maven Options to pass to the Maven Goals
96               parameter.
97
98               Examples:
99               -Dskip.karaf.featureTest=true  # To disable karaf SingleFeatureTests
100               --fail-never   # NEVER fail the build, regardless of project result
101               --fail-at-end  # Only fail the build afterwards; allow all non-impacted builds to continue
102       - string:
103           name: ARCHIVE_ARTIFACTS
104           default: '{archive-artifacts}'
105           description: Artifacts to archive to the logs server.
106
107     scm:
108       - git:
109           credentials-id: 'opendaylight-jenkins-ssh'
110           url: '$GIT_BASE'
111           refspec: '$GERRIT_REFSPEC'
112           branches:
113             - '$GERRIT_BRANCH'
114           choosing-strategy: default
115           skip-tag: true
116           submodule:
117             recursive: true
118             timeout: 60
119
120     wrappers:
121       - opendaylight-infra-wrappers:
122           build-timeout: '900'
123
124     triggers:
125       - timed: '{cron}'
126
127     builders:
128       # force jenkins install of maven version before any shell scripts use it
129       - lf-maven-install:
130           mvn-version: '{mvn-version}'
131       - wipe-local-maven-repo
132       - jacoco-nojava-workaround
133       - shell: "./scripts/list-project-dependencies.sh"
134       - autorelease-determine-merge-order
135       - autorelease-cfp:
136           autorelease-settings: 'autorelease-settings'
137           global-settings: 'odl-global-settings'
138       - autorelease-generate-release-patches
139       - autorelease-generate-artifact-versions
140       - autorelease-distribute-taglist
141       - distribute-build-url:
142           path: 'integration/distribution/$KARAF_ARTIFACT/src/main/assembly'
143       # In a perfect world projects should be releasing separately and we consume them
144       # via a project that pulls the release bits from each project from Nexus.
145       # Keep the patches compatible with that ideal, but apply an edit
146       # to enable building in a single maven reactor afterwards.
147       - autorelease-fix-relative-paths
148       - maven-target:
149           maven-version: 'mvn33'
150           pom: 'pom.xml'
151           goals: |
152               clean deploy
153               $EXTRA_MVN_OPTS
154               -Pintegrationtests,docs,repoBuild
155               -Dcheckstyle.skip=true
156               -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage
157               {opendaylight-infra-mvn-opts}
158           java-opts:
159             - '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
160           settings: 'autorelease-settings'
161           settings-type: cfp
162           global-settings: 'global-settings'
163           global-settings-type: cfp
164       - autorelease-maven-deploy
165       - autorelease-get-integration-test-variables
166       - autorelease-maven-sources:
167           opendaylight-infra-mvn-opts: '{opendaylight-infra-mvn-opts}'
168           maven-version: 'mvn33'
169           settings: 'autorelease-settings'
170           global-settings: 'global-settings'
171       - autorelease-maven-sources-post-process
172       - shell: |
173           mkdir -p archives/
174           cp *.log *.prop $_
175
176     publishers:
177       - opendaylight-infra-notify-status
178       - trigger-parameterized-builds:
179           - project: 'integration-distribution-test-{integration-test}'
180             condition: UNSTABLE_OR_BETTER
181             property-file: variables.jenkins-trigger
182             fail-on-missing: true
183           - project: 'integration-distribution-test-{integration-test}'
184             condition: FAILED
185             trigger-with-no-params: true
186           - project: 'integration-sanity-test-{integration-test}'
187             condition: UNSTABLE_OR_BETTER
188             property-file: variables.jenkins-trigger
189             fail-on-missing: true
190           - project: 'integration-sanity-test-{integration-test}'
191             condition: FAILED
192             trigger-with-no-params: true
193           - project: 'packaging-build-rpm-{stream}'
194             condition: UNSTABLE_OR_BETTER
195             predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL
196             property-file: variables.jenkins-trigger
197             fail-on-missing: true
198           - project: 'packaging-build-deb-{stream}'
199             condition: UNSTABLE_OR_BETTER
200             predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL
201             property-file: variables.jenkins-trigger
202             fail-on-missing: true
203       - lf-infra-publish
204
205 - job-template:
206     name: autorelease-update-validate-jobs-{stream}
207     project-type: freestyle
208     node: centos7-builder-2c-1g
209
210     properties:
211       - lf-infra-properties:
212           build-days-to-keep: 7
213
214     parameters:
215       - lf-infra-parameters:
216           project: releng/builder
217           branch: '{branch}'
218           stream: '{stream}'
219           lftools-version: '{lftools-version}'
220
221     scm:
222       - lf-infra-gerrit-scm:
223           git-url: '$GIT_URL/releng/builder'
224           branch: master
225           refspec: 'refs/heads/master'
226           jenkins-ssh-credential: opendaylight-jenkins-ssh
227           submodule-recursive: true
228           choosing-strategy: default
229
230     triggers:
231       - gerrit:
232           server-name: '{gerrit-server-name}'
233           trigger-on:
234             - change-merged-event
235             - comment-added-contains-event:
236                 comment-contains-value: remerge$
237           projects:
238             - project-compare-type: ANT
239               project-pattern: '{project}'
240               branches:
241                 - branch-compare-type: ANT
242                   branch-pattern: '**/{branch}'
243               file-paths:
244                 - compare-type: ANT
245                   pattern: pom.xml
246
247     wrappers:
248       - lf-infra-wrappers:
249           build-timeout: 10
250           jenkins-ssh-credential: opendaylight-jenkins-ssh
251
252     builders:
253       - autorelease-update-validate-projects
254       - opendaylight-infra-push-gerrit-patch:
255           project: 'releng/builder'
256           gerrit-topic: 'autorelease-update-validate-jobs-{stream}'
257           gerrit-commit-message: |
258               Update validate autorelease projects for {stream}
259
260     publishers:
261       - lf-infra-publish
262
263 - job-template:
264     name: autorelease-version-bump-{stream}
265     project-type: freestyle
266     node: '{build-node}'
267
268     properties:
269       - opendaylight-infra-properties:
270           build-days-to-keep: 7
271
272     parameters:
273       - lf-infra-parameters:
274           project: releng/autorelease
275           branch: '{branch}'
276           stream: '{stream}'
277           refspec: 'refs/heads/{branch}'
278           lftools-version: '{lftools-version}'
279       - string:
280           name: RELEASE_TAG
281           default: '{next-release-tag}'
282           description: |
283               Release that is being version bumped.
284               Eg. Lithium, Beryllium, Boron, Carbon, Carbon-SR1, Carbon-SR2...
285       - bool:
286           name: DRY_RUN
287           default: true
288           description: |
289               If DRY_RUN is enabled modifications are not published to Gerrit
290               and artifacts are not pushed to Nexus. Instead the build will be
291               performed using the goals "clean install".
292       - maven-exec:
293           maven-version: mvn33
294
295     scm:
296       - lf-infra-gerrit-scm:
297           git-url: '$GIT_URL/$GERRIT_PROJECT'
298           branch: '{branch}'
299           refspec: 'refs/heads/{branch}'
300           jenkins-ssh-credential: opendaylight-jenkins-ssh
301           submodule-recursive: true
302           choosing-strategy: default
303
304     wrappers:
305       - lf-infra-wrappers:
306           build-timeout: 480
307           jenkins-ssh-credential: opendaylight-jenkins-ssh
308
309     builders:
310       # force jenkins install of maven version before any shell scripts use it
311       - maven-target:
312           maven-version: mvn33
313           goals: '-version'
314           settings: autorelease-settings
315           settings-type: cfp
316           global-settings: global-settings
317           global-settings-type: cfp
318       - autorelease-cfp
319       - shell: !include-raw-escape:
320           - ../global-jjb/shell/lftools-install.sh
321           - version-bump.sh
322
323     publishers:
324       - lf-infra-publish
325
326 - job-template:
327     name: 'autorelease-generate-release-notes-{stream}'
328
329     ######################
330     # Default parameters #
331     ######################
332
333     gerrit_merge_triggers:
334       - comment-added-contains-event:
335           comment-contains-value: generate-release-notes .+$
336
337     #####################
338     # Job Configuration #
339     #####################
340
341     project-type: freestyle
342     node: centos7-builder-2c-8g
343
344     properties:
345       - lf-infra-properties:
346           build-days-to-keep: 7
347
348     parameters:
349       - lf-infra-parameters:
350           project: '{project}'
351           branch: '{branch}'
352           stream: '{stream}'
353           lftools-version: '{lftools-version}'
354       - string:
355           name: RELEASE
356           description: Release to generate release notes for.
357
358     scm:
359       - lf-infra-gerrit-scm:
360           git-url: '$GIT_URL/$GERRIT_PROJECT'
361           branch: '$GERRIT_BRANCH'
362           refspec: '$GERRIT_REFSPEC'
363           jenkins-ssh-credential: opendaylight-jenkins-ssh
364           submodule-recursive: true
365           choosing-strategy: default
366
367     wrappers:
368       - lf-infra-wrappers:
369           build-timeout: 10
370           jenkins-ssh-credential: opendaylight-jenkins-ssh
371
372     triggers:
373       - gerrit:
374           server-name: '{gerrit-server-name}'
375           trigger-on: '{obj:gerrit_merge_triggers}'
376           projects:
377             - project-compare-type: ANT
378               project-pattern: '{project}'
379               branches:
380                 - branch-compare-type: ANT
381                   branch-pattern: '**/{branch}'
382
383     builders:
384       - autorelease-generate-release-notes
385
386     publishers:
387       - lf-infra-publish
388
389 - job-template:
390     name: '{project-name}-validate-autorelease-{stream}'
391
392     ############
393     # Defaults #
394     ############
395
396     java-version: openjdk8
397
398     #####################
399     # Job Configuration #
400     #####################
401
402     disabled: false
403     project-type: freestyle
404     # Note: This NEEDS to be hardcoded as projects should NOT be allowed to
405     #       override the build node.
406     node: centos7-builder-2c-8g
407     concurrent: true
408     jdk: '{java-version}'
409
410     properties:
411       - lf-infra-properties:
412           build-days-to-keep: 7
413
414     parameters:
415       - lf-infra-parameters:
416           project: '{project}'
417           stream: '{stream}'
418           branch: '{branch}'
419           lftools-version: '{lftools-version}'
420       - autorelease-release-tag:
421           release-tag: validate
422       - string:
423           name: CLONE_URL
424           default: '{git-url}/releng/autorelease'
425           description: "Autorelease clone URL"
426
427     scm:
428       - git:
429           url: '$CLONE_URL'
430           credentials-id: 'opendaylight-jenkins-ssh'
431           refspec: ''
432           branches:
433             - 'origin/{branch}'
434           skip-tag: true
435           submodule:
436             recursive: true
437             timeout: 60
438
439     wrappers:
440       - opendaylight-infra-wrappers:
441           build-timeout: '{build-timeout}'
442
443     triggers:
444       - gerrit-trigger-patch-submitted:
445           gerrit-server-name: '{gerrit-server-name}'
446           project: '{project}'
447           branch: '{branch}'
448           files: '**/*.xml'
449
450     builders:
451       - autorelease-checkout-gerrit-patch
452       - jacoco-nojava-workaround
453       - shell: "./scripts/list-project-dependencies.sh"
454       - autorelease-determine-merge-order
455       - autorelease-generate-release-patches
456       # In a perfect world projects should be releasing separately and we consume them
457       # via a project that pulls the release bits from each project from Nexus.
458       # Keep the patches compatible with that ideal, but apply an edit
459       # to enable building in a single maven reactor afterwards.
460       - autorelease-fix-relative-paths
461       - maven-target:
462           maven-version: mvn33
463           pom: validate-pom.xml
464           goals: |
465               clean install dependency:tree
466               -T1.5C
467               -Pq
468               {opendaylight-infra-mvn-opts}
469           java-opts:
470             - '-Xmx8g'
471           settings: autorelease-settings
472           settings-type: cfp
473           global-settings: global-settings
474           global-settings-type: cfp
475       # Hack to workaround the duplicate-finder plugin in odlparent breaking validate-autorelease
476       - shell: sed -i 's/validate/none/' /tmp/r/org/opendaylight/odlparent/odlparent/3.0.2/odlparent-3.0.2.pom
477       - maven-target:
478           maven-version: mvn33
479           pom: pom.xml
480           goals: |
481               clean validate
482               -Pq
483               {opendaylight-infra-mvn-opts}
484           java-opts:
485             - '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
486           settings: autorelease-settings
487           settings-type: cfp
488           global-settings: global-settings
489           global-settings-type: cfp
490       - shell: |
491           mkdir -p archives/
492           cp *.log $_
493
494     publishers:
495       - email-notification:
496           email-recipients: '{email-recipients}'
497           email-prefix: '[autorelease] [{project-name}]'
498       - lf-infra-publish