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