CI: Add jobs for openjdk21 and mvn 3.9.x
[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     build-node: "centos8-builder-2c-8g"
433
434     gerrit_merge_triggers:
435       - comment-added-contains-event:
436           comment-contains-value: generate-release-notes .+$
437
438     #####################
439     # Job Configuration #
440     #####################
441
442     project-type: freestyle
443     node: "{build-node}"
444     disabled: "{disable-job}"
445
446     properties:
447       - lf-infra-properties:
448           build-days-to-keep: 7
449
450     parameters:
451       - lf-infra-parameters:
452           project: "{project}"
453           branch: "{branch}"
454           stream: "{stream}"
455           lftools-version: "{lftools-version}"
456       - string:
457           name: RELEASE
458           description: |
459             Release to generate release notes for.
460             Eg. Potassium-SR1, Calcium-SR1 ...
461     scm:
462       - lf-infra-gerrit-scm:
463           git-url: "$GIT_URL/$GERRIT_PROJECT"
464           branch: "$GERRIT_BRANCH"
465           refspec: "$GERRIT_REFSPEC"
466           jenkins-ssh-credential: opendaylight-jenkins-ssh
467           submodule-disable: false
468           submodule-recursive: true
469           submodule-timeout: 10
470           choosing-strategy: default
471
472     wrappers:
473       - lf-infra-wrappers:
474           build-timeout: 10
475           jenkins-ssh-credential: opendaylight-jenkins-ssh
476
477     triggers:
478       - gerrit:
479           server-name: "{gerrit-server-name}"
480           trigger-on: "{obj:gerrit_merge_triggers}"
481           projects:
482             - project-compare-type: ANT
483               project-pattern: "{project}"
484               branches:
485                 - branch-compare-type: ANT
486                   branch-pattern: "**/{branch}"
487
488     builders:
489       - lf-infra-pre-build
490       - autorelease-generate-release-notes
491
492     publishers:
493       - lf-infra-publish
494
495 - job-template:
496     name: "{project-name}-validate-autorelease-{stream}"
497
498     #####################
499     # Default variables #
500     #####################
501
502     java-version: openjdk17
503     mvn-global-settings: global-settings
504     mvn-settings: autorelease-settings
505     mvn-version: mvn38
506     disable-job: "false"
507
508     #####################
509     # Job Configuration #
510     #####################
511
512     project-type: freestyle
513     # Note: This NEEDS to be hardcoded as projects should NOT be allowed to
514     #       override the build node.
515     node: centos8-builder-2c-8g
516     concurrent: true
517     jdk: "{java-version}"
518     disabled: "{disable-job}"
519
520     properties:
521       - lf-infra-properties:
522           build-days-to-keep: 7
523
524     parameters:
525       - lf-infra-parameters:
526           project: "{project}"
527           stream: "{stream}"
528           branch: "{branch}"
529           lftools-version: "{lftools-version}"
530       - autorelease-release-tag:
531           release-tag: validate
532       - string:
533           name: CLONE_URL
534           default: "{git-url}/releng/autorelease"
535           description: "Autorelease clone URL"
536
537     scm:
538       - git:
539           url: "$CLONE_URL"
540           credentials-id: "opendaylight-jenkins-ssh"
541           refspec: ""
542           branches:
543             - "origin/{branch}"
544           skip-tag: true
545           submodule:
546             recursive: true
547             timeout: 60
548
549     wrappers:
550       - opendaylight-infra-wrappers:
551           build-timeout: "{build-timeout}"
552
553     triggers:
554       - gerrit-trigger-patch-submitted:
555           gerrit-server-name: "{gerrit-server-name}"
556           project: "{project}"
557           branch: "{branch}"
558           files: "**/*.xml"
559           forbidden-files: ""
560
561     builders:
562       - lf-infra-pre-build
563       - lf-update-java-alternatives:
564           java-version: "{java-version}"
565       - autorelease-checkout-gerrit-patch
566       - lf-jacoco-nojava-workaround
567       - shell: "./scripts/list-project-dependencies.sh"
568       - autorelease-determine-merge-order
569       - autorelease-generate-release-patches
570       # In a perfect world projects should be releasing separately and we consume them
571       # via a project that pulls the release bits from each project from Nexus.
572       # Keep the patches compatible with that ideal, but apply an edit
573       # to enable building in a single maven reactor afterwards.
574       - autorelease-fix-relative-paths
575       - maven-target:
576           maven-version: "{mvn-version}"
577           pom: validate-pom.xml
578           goals: |
579             clean install dependency:tree
580             -T1.5C
581             -Pq
582             {opendaylight-infra-mvn-opts}
583           java-opts:
584             - "-Xmx8g"
585           settings: "{mvn-settings}"
586           settings-type: cfp
587           global-settings: "{mvn-global-settings}"
588           global-settings-type: cfp
589       - maven-target:
590           maven-version: "{mvn-version}"
591           pom: pom.xml
592           goals: |
593             clean validate
594             -Pq
595             {opendaylight-infra-mvn-opts}
596           java-opts:
597             - "-Xmx8g -Dmaven.compile.fork=true"
598           settings: "{mvn-settings}"
599           settings-type: cfp
600           global-settings: "{mvn-global-settings}"
601           global-settings-type: cfp
602       - shell: |
603           mkdir -p archives/
604           cp *.log $_
605
606     publishers:
607       - email-notification:
608           email-recipients: "{email-recipients}"
609           email-prefix: "[autorelease] [{project-name}]"
610       - lf-infra-publish