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