Add example for release-notes param description
[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           submodule-timeout: 10
42           choosing-strategy: default
43
44     wrappers:
45       - lf-infra-wrappers:
46           build-timeout: 10
47           jenkins-ssh-credential: opendaylight-jenkins-ssh
48
49     builders:
50       - shell: !include-raw-escape: branch-cut.sh
51
52     publishers:
53       - lf-infra-publish
54
55 - job-template:
56     name: 'autorelease-release-{stream}'
57
58     ######################
59     # Default parameters #
60     ######################
61
62     build-node: '{build-node}'
63     cron: 'H 0 * * *'
64     java-version: openjdk8
65     mvn-global-settings: global-settings
66     mvn-settings: autorelease-settings
67     mvn-version: mvn35
68     extra-mvn-opts: ''
69
70     #####################
71     # Job Configuration #
72     #####################
73
74     project-type: freestyle
75     node: '{build-node}'
76     jdk: '{java-version}'
77
78     properties:
79       - lf-infra-properties:
80           build-days-to-keep: 30
81
82     parameters:
83       - maven-exec:
84           maven-version: '{mvn-version}'
85       - lf-infra-parameters:
86           project: '{project}'
87           stream: '{stream}'
88           branch: '{branch}'
89           lftools-version: '{lftools-version}'
90       - distribution-karaf-version:
91           karaf-version: '{karaf-version}'
92       - autorelease-release-tag:
93           release-tag: '{stream}'
94       - string:
95           name: EXTRA_MVN_OPTS
96           default: '{extra-mvn-opts}'
97           description: |
98               Additional optional Maven Options to pass to the Maven Goals
99               parameter.
100
101               Examples:
102               -Dskip.karaf.featureTest=true  # To disable karaf SingleFeatureTests
103               --fail-never   # NEVER fail the build, regardless of project result
104               --fail-at-end  # Only fail the build afterwards; allow all non-impacted builds to continue
105       - string:
106           name: ARCHIVE_ARTIFACTS
107           default: '{archive-artifacts}'
108           description: Artifacts to archive to the logs server.
109       - string:
110           name: STAGING_PROFILE_ID
111           default: '{staging-profile-id}'
112           description: Nexus staging profile ID.
113
114     scm:
115       - git:
116           credentials-id: 'opendaylight-jenkins-ssh'
117           url: '$GIT_BASE'
118           refspec: '$GERRIT_REFSPEC'
119           branches:
120             - '$GERRIT_BRANCH'
121           choosing-strategy: default
122           skip-tag: true
123           submodule:
124             recursive: true
125             timeout: 60
126
127     wrappers:
128       - opendaylight-infra-wrappers:
129           build-timeout: '900'
130
131     triggers:
132       - timed: '{cron}'
133
134     builders:
135       - lf-infra-pre-build
136       # force jenkins install of maven version before any shell scripts use it
137       - lf-maven-install:
138           mvn-version: '{mvn-version}'
139       - wipe-local-maven-repo
140       - lf-jacoco-nojava-workaround
141       - shell: "./scripts/list-project-dependencies.sh"
142       - autorelease-determine-merge-order
143       - lf-provide-maven-settings:
144           global-settings-file: '{mvn-global-settings}'
145           settings-file: '{mvn-settings}'
146       - lf-infra-create-netrc:
147           server-id: '{mvn-staging-id}'
148       - autorelease-generate-release-patches
149       - autorelease-generate-artifact-versions
150       - autorelease-distribute-taglist
151       - distribute-build-url:
152           path: 'integration/distribution/$KARAF_ARTIFACT/src/main/assembly'
153       # In a perfect world projects should be releasing separately and we consume them
154       # via a project that pulls the release bits from each project from Nexus.
155       # Keep the patches compatible with that ideal, but apply an edit
156       # to enable building in a single maven reactor afterwards.
157       - autorelease-fix-relative-paths
158       - maven-target:
159           maven-version: '{mvn-version}'
160           pom: 'pom.xml'
161           goals: |
162               clean deploy
163               $EXTRA_MVN_OPTS
164               -Pintegrationtests,repoBuild
165               -Dcheckstyle.skip=true
166               -DaltDeploymentRepository=staging::default::file:"$WORKSPACE"/m2repo
167               {opendaylight-infra-mvn-opts}
168           java-opts:
169             - '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
170           settings: '{mvn-settings}'
171           settings-type: cfp
172           global-settings: '{mvn-global-settings}'
173           global-settings-type: cfp
174       - lf-maven-stage
175       - autorelease-get-integration-test-variables
176       - autorelease-maven-sources:
177           opendaylight-infra-mvn-opts: '{opendaylight-infra-mvn-opts}'
178           maven-version: '{mvn-version}'
179           settings: '{mvn-settings}'
180           global-settings: '{mvn-global-settings}'
181       - shell: |
182           mkdir -p archives/
183           cp *.log *.prop $_
184       - lf-provide-maven-settings-cleanup
185
186     publishers:
187       - opendaylight-infra-notify-status
188       - trigger-parameterized-builds:
189           - project: 'integration-distribution-test-{integration-test}'
190             condition: UNSTABLE_OR_BETTER
191             property-file: variables.jenkins-trigger
192             fail-on-missing: true
193           - project: 'integration-distribution-test-{integration-test}'
194             condition: FAILED
195             trigger-with-no-params: true
196           - project: 'packaging-build-rpm-{stream}'
197             condition: UNSTABLE_OR_BETTER
198             predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL
199             property-file: variables.jenkins-trigger
200             fail-on-missing: true
201           - project: 'packaging-build-deb-{stream}'
202             condition: UNSTABLE_OR_BETTER
203             predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL
204             property-file: variables.jenkins-trigger
205             fail-on-missing: true
206       # Critical component of the OpenDaylight community
207       - postbuildscript:
208           builders:
209             - role: BOTH
210               build-on:
211                 - SUCCESS
212               build-steps:
213                 - shell: echo '#topic cookies'
214           mark-unstable-if-failed: false
215       - lf-infra-publish
216
217 - job-template:
218     name: 'autorelease-update-submodules-{stream}'
219
220     ######################
221     # Default parameters #
222     ######################
223
224     cron: 'H 0 * * *'
225
226     #####################
227     # Job configuration #
228     #####################
229
230     project-type: freestyle
231     node: centos7-builder-2c-2g
232
233     properties:
234       - lf-infra-properties:
235           build-days-to-keep: 7
236
237     parameters:
238       - lf-infra-parameters:
239           project: releng/autorelease
240           branch: '{branch}'
241           stream: '{stream}'
242           refspec: 'refs/heads/{branch}'
243           lftools-version: '{lftools-version}'
244
245     scm:
246       - lf-infra-gerrit-scm:
247           git-url: '$GIT_URL/$GERRIT_PROJECT'
248           branch: '{branch}'
249           refspec: 'refs/heads/{branch}'
250           jenkins-ssh-credential: opendaylight-jenkins-ssh
251           submodule-recursive: true
252           submodule-timeout: 10
253           choosing-strategy: default
254
255     wrappers:
256       - lf-infra-wrappers:
257           build-timeout: 10
258           jenkins-ssh-credential: opendaylight-jenkins-ssh
259
260     triggers:
261       - timed: '{obj:cron}'
262
263     builders:
264       - lf-infra-pre-build
265       # Fetch latest head of branch
266       - shell: |
267           git checkout $GERRIT_BRANCH
268           git submodule update --remote
269           git add .
270       - lf-infra-push-gerrit-patch:
271           project: '{project}'
272           gerrit-user: 'jenkins-$SILO'
273           gerrit-host: 'git.opendaylight.org'
274           gerrit-topic: 'autorelease-update-submodules'
275           gerrit-commit-message: 'Update submodules to latest HEAD of branch'
276           reviewers-email: ''
277
278     publishers:
279       - lf-infra-publish
280
281 - job-template:
282     name: autorelease-update-validate-jobs-{stream}
283
284     ######################
285     # Default parameters #
286     ######################
287
288     cron: '@weekly'
289
290     #####################
291     # Job configuration #
292     #####################
293
294     project-type: freestyle
295     node: centos7-builder-2c-1g
296
297     properties:
298       - lf-infra-properties:
299           build-days-to-keep: 7
300
301     parameters:
302       - lf-infra-parameters:
303           project: releng/builder
304           branch: '{branch}'
305           stream: '{stream}'
306           lftools-version: '{lftools-version}'
307
308     scm:
309       - lf-infra-gerrit-scm:
310           git-url: '$GIT_URL/releng/builder'
311           branch: master
312           refspec: 'refs/heads/master'
313           jenkins-ssh-credential: opendaylight-jenkins-ssh
314           submodule-recursive: true
315           submodule-timeout: 10
316           choosing-strategy: default
317
318     triggers:
319       - timed: '{cron}'
320       - gerrit:
321           server-name: '{gerrit-server-name}'
322           trigger-on:
323             - change-merged-event
324             - comment-added-contains-event:
325                 comment-contains-value: remerge$
326           projects:
327             - project-compare-type: ANT
328               project-pattern: '{project}'
329               branches:
330                 - branch-compare-type: ANT
331                   branch-pattern: '**/{branch}'
332               file-paths:
333                 - compare-type: ANT
334                   pattern: pom.xml
335
336     wrappers:
337       - lf-infra-wrappers:
338           build-timeout: 10
339           jenkins-ssh-credential: opendaylight-jenkins-ssh
340
341     builders:
342       - lf-infra-pre-build
343       - autorelease-update-project-views
344       - autorelease-update-validate-projects
345       - lf-infra-push-gerrit-patch:
346           project: '{project}'
347           gerrit-user: 'jenkins-$SILO'
348           gerrit-host: 'git.opendaylight.org'
349           gerrit-topic: 'autorelease-update-validate-jobs-{stream}'
350           gerrit-commit-message: |
351               'Update validate autorelease projects for {stream}'
352           reviewers-email: 'jenkins-releng@opendaylight.org'
353
354     publishers:
355       - lf-infra-publish
356
357 - job-template:
358     name: autorelease-version-bump-{stream}
359
360     #####################
361     # Default variables #
362     #####################
363
364     mvn-global-settings: global-settings
365     mvn-settings: autorelease-settings
366     mvn-version: mvn35
367
368     #####################
369     # Job configuration #
370     #####################
371
372     project-type: freestyle
373     node: '{build-node}'
374
375     properties:
376       - opendaylight-infra-properties:
377           build-days-to-keep: 7
378
379     parameters:
380       - lf-infra-parameters:
381           project: releng/autorelease
382           branch: '{branch}'
383           stream: '{stream}'
384           refspec: 'refs/heads/{branch}'
385           lftools-version: '{lftools-version}'
386       - string:
387           name: RELEASE_TAG
388           default: '{stream}'
389           description: |
390               Release that is being version bumped.
391               Eg. Lithium, Beryllium, Boron, Carbon, Carbon-SR1, Carbon-SR2...
392       - bool:
393           name: BRANCH_CUT
394           default: false
395           description: |
396               If BRANCH_CUT is enabled, perform version bump for branch cutting
397               workflow, else perform version bump for simultaneous release
398               workflow (detault).
399       - bool:
400           name: DRY_RUN
401           default: true
402           description: |
403               If DRY_RUN is enabled modifications are not published to Gerrit
404               and artifacts are not pushed to Nexus. Instead the build will be
405               performed using the goals "clean install".
406       - maven-exec:
407           maven-version: '{mvn-version}'
408
409     scm:
410       - lf-infra-gerrit-scm:
411           git-url: '$GIT_URL/$GERRIT_PROJECT'
412           branch: '{branch}'
413           refspec: 'refs/heads/{branch}'
414           jenkins-ssh-credential: opendaylight-jenkins-ssh
415           submodule-recursive: true
416           submodule-timeout: 10
417           choosing-strategy: default
418
419     wrappers:
420       - lf-infra-wrappers:
421           build-timeout: 480
422           jenkins-ssh-credential: opendaylight-jenkins-ssh
423
424     builders:
425       - lf-infra-pre-build
426       # force jenkins install of maven version before any shell scripts use it
427       - lf-maven-install:
428           mvn-version: '{mvn-version}'
429       - lf-provide-maven-settings:
430           global-settings-file: '{mvn-global-settings}'
431           settings-file: '{mvn-settings}'
432       - shell: !include-raw-escape:
433           - version-bump.sh
434
435     publishers:
436       - lf-infra-publish
437
438 - job-template:
439     name: 'autorelease-generate-release-notes-{stream}'
440
441     ######################
442     # Default parameters #
443     ######################
444
445     gerrit_merge_triggers:
446       - comment-added-contains-event:
447           comment-contains-value: generate-release-notes .+$
448
449     #####################
450     # Job Configuration #
451     #####################
452
453     project-type: freestyle
454     node: centos7-builder-2c-8g
455
456     properties:
457       - lf-infra-properties:
458           build-days-to-keep: 7
459
460     parameters:
461       - lf-infra-parameters:
462           project: '{project}'
463           branch: '{branch}'
464           stream: '{stream}'
465           lftools-version: '{lftools-version}'
466       - string:
467           name: RELEASE
468           description: |
469               Release to generate release notes for.
470               Eg. Oxygen-SR1, Fluorine-SR2...
471     scm:
472       - lf-infra-gerrit-scm:
473           git-url: '$GIT_URL/$GERRIT_PROJECT'
474           branch: '$GERRIT_BRANCH'
475           refspec: '$GERRIT_REFSPEC'
476           jenkins-ssh-credential: opendaylight-jenkins-ssh
477           submodule-recursive: true
478           submodule-timeout: 10
479           choosing-strategy: default
480
481     wrappers:
482       - lf-infra-wrappers:
483           build-timeout: 10
484           jenkins-ssh-credential: opendaylight-jenkins-ssh
485
486     triggers:
487       - gerrit:
488           server-name: '{gerrit-server-name}'
489           trigger-on: '{obj:gerrit_merge_triggers}'
490           projects:
491             - project-compare-type: ANT
492               project-pattern: '{project}'
493               branches:
494                 - branch-compare-type: ANT
495                   branch-pattern: '**/{branch}'
496
497     builders:
498       - lf-infra-pre-build
499       - autorelease-generate-release-notes
500
501     publishers:
502       - lf-infra-publish
503
504 - job-template:
505     name: '{project-name}-validate-autorelease-{stream}'
506
507     #####################
508     # Default variables #
509     #####################
510
511     java-version: openjdk8
512     mvn-global-settings: global-settings
513     mvn-settings: autorelease-settings
514     mvn-version: mvn35
515
516     #####################
517     # Job Configuration #
518     #####################
519
520     disabled: false
521     project-type: freestyle
522     # Note: This NEEDS to be hardcoded as projects should NOT be allowed to
523     #       override the build node.
524     node: centos7-builder-2c-8g
525     concurrent: true
526     jdk: '{java-version}'
527
528     properties:
529       - lf-infra-properties:
530           build-days-to-keep: 7
531
532     parameters:
533       - lf-infra-parameters:
534           project: '{project}'
535           stream: '{stream}'
536           branch: '{branch}'
537           lftools-version: '{lftools-version}'
538       - autorelease-release-tag:
539           release-tag: validate
540       - string:
541           name: CLONE_URL
542           default: '{git-url}/releng/autorelease'
543           description: "Autorelease clone URL"
544
545     scm:
546       - git:
547           url: '$CLONE_URL'
548           credentials-id: 'opendaylight-jenkins-ssh'
549           refspec: ''
550           branches:
551             - 'origin/{branch}'
552           skip-tag: true
553           submodule:
554             recursive: true
555             timeout: 60
556
557     wrappers:
558       - opendaylight-infra-wrappers:
559           build-timeout: '{build-timeout}'
560
561     triggers:
562       - gerrit-trigger-patch-submitted:
563           gerrit-server-name: '{gerrit-server-name}'
564           project: '{project}'
565           branch: '{branch}'
566           files: '**/*.xml'
567           forbidden-files: ''
568
569     builders:
570       - lf-infra-pre-build
571       - autorelease-checkout-gerrit-patch
572       - autorelease-compare-projects
573       - lf-jacoco-nojava-workaround
574       - shell: "./scripts/list-project-dependencies.sh"
575       - autorelease-determine-merge-order
576       - autorelease-generate-release-patches
577       # In a perfect world projects should be releasing separately and we consume them
578       # via a project that pulls the release bits from each project from Nexus.
579       # Keep the patches compatible with that ideal, but apply an edit
580       # to enable building in a single maven reactor afterwards.
581       - autorelease-fix-relative-paths
582       - maven-target:
583           maven-version: '{mvn-version}'
584           pom: validate-pom.xml
585           goals: |
586               clean install dependency:tree
587               -T1.5C
588               -Pq
589               {opendaylight-infra-mvn-opts}
590           java-opts:
591             - '-Xmx8g'
592           settings: '{mvn-settings}'
593           settings-type: cfp
594           global-settings: '{mvn-global-settings}'
595           global-settings-type: cfp
596       - maven-target:
597           maven-version: '{mvn-version}'
598           pom: pom.xml
599           goals: |
600               clean validate
601               -Pq
602               {opendaylight-infra-mvn-opts}
603           java-opts:
604             - '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
605           settings: '{mvn-settings}'
606           settings-type: cfp
607           global-settings: '{mvn-global-settings}'
608           global-settings-type: cfp
609       - shell: |
610           mkdir -p archives/
611           cp *.log $_
612
613     publishers:
614       - email-notification:
615           email-recipients: '{email-recipients}'
616           email-prefix: '[autorelease] [{project-name}]'
617       - lf-infra-publish