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