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