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