Fix reviewers mail in JJB
[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 -Dmaven.compile.fork=true"
69     mvn-params: ""
70     mvn-settings: autorelease-settings
71     mvn-version: mvn35
72     sign-artifacts: true
73     disable-job: "false"
74
75     #####################
76     # Job Configuration #
77     #####################
78
79     project-type: freestyle
80     node: "{build-node}"
81     disabled: "{disable-job}"
82
83     properties:
84       - lf-infra-properties:
85           build-days-to-keep: 30
86
87     parameters:
88       - lf-infra-parameters:
89           project: "{project}"
90           stream: "{stream}"
91           branch: "{branch}"
92           lftools-version: "{lftools-version}"
93       - lf-infra-maven-parameters:
94           mvn-opts: "{mvn-opts}"
95           mvn-params: "{mvn-params}"
96           mvn-version: "{mvn-version}"
97       - distribution-karaf-version:
98           karaf-version: "{karaf-version}"
99       - autorelease-release-tag:
100           release-tag: "{stream}"
101       - string:
102           name: ARCHIVE_ARTIFACTS
103           default: "{archive-artifacts}"
104           description: Artifacts to archive to the logs server.
105       - string:
106           name: STAGING_PROFILE_ID
107           default: "{staging-profile-id}"
108           description: Nexus staging profile ID.
109
110     scm:
111       - git:
112           credentials-id: "opendaylight-jenkins-ssh"
113           url: "$GIT_BASE"
114           refspec: "$GERRIT_REFSPEC"
115           branches:
116             - "$GERRIT_BRANCH"
117           choosing-strategy: default
118           skip-tag: true
119           submodule:
120             recursive: true
121             timeout: 60
122
123     wrappers:
124       - opendaylight-infra-wrappers:
125           build-timeout: "900"
126
127     triggers:
128       - timed: "{cron}"
129
130     builders:
131       - lf-infra-pre-build
132       # force jenkins install of maven version before any shell scripts use it
133       - lf-maven-install:
134           mvn-version: "{mvn-version}"
135       - wipe-local-maven-repo
136       - lf-jacoco-nojava-workaround
137       - shell: "./scripts/list-project-dependencies.sh"
138       - autorelease-determine-merge-order
139       - lf-provide-maven-settings:
140           global-settings-file: "{mvn-global-settings}"
141           settings-file: "{mvn-settings}"
142       - autorelease-generate-release-patches
143       - autorelease-generate-artifact-versions
144       - lf-update-java-alternatives:
145           java-version: "{java-version}"
146       - autorelease-distribute-taglist
147       - distribute-build-url:
148           path: "integration/distribution/$KARAF_ARTIFACT/src/main/assembly"
149       # In a perfect world projects should be releasing separately and we consume them
150       # via a project that pulls the release bits from each project from Nexus.
151       # Keep the patches compatible with that ideal, but apply an edit
152       # to enable building in a single maven reactor afterwards.
153       - autorelease-fix-relative-paths
154       - lf-maven-build:
155           mvn-goals: "{mvn-goals}"
156       - lf-sigul-sign-dir:
157           sign-artifacts: "{sign-artifacts}"
158           sign-dir: "$WORKSPACE/m2repo"
159           sign-mode: serial
160       - lf-maven-stage:
161           mvn-global-settings: "{mvn-global-settings}"
162           mvn-settings: "{mvn-settings}"
163           mvn-staging-id: "{mvn-staging-id}"
164       - autorelease-get-integration-test-variables
165       - autorelease-maven-sources:
166           opendaylight-infra-mvn-opts: "{opendaylight-infra-mvn-opts}"
167           maven-version: "{mvn-version}"
168           settings: "{mvn-settings}"
169           global-settings: "{mvn-global-settings}"
170       - shell: |
171           mkdir -p archives/
172           cp *.log *.prop $_
173
174     publishers:
175       - opendaylight-infra-notify-status
176       - trigger-parameterized-builds:
177           - project: "integration-distribution-test-{integration-test}"
178             condition: UNSTABLE_OR_BETTER
179             property-file: variables.jenkins-trigger
180             fail-on-missing: true
181           - project: "integration-distribution-test-{integration-test}"
182             condition: FAILED
183             trigger-with-no-params: true
184       # Critical component of the OpenDaylight community
185       - postbuildscript:
186           builders:
187             - role: BOTH
188               build-on:
189                 - SUCCESS
190               build-steps:
191                 - shell: echo '#topic cookies'
192           mark-unstable-if-failed: false
193       - lf-infra-publish
194
195 - job-template:
196     name: "autorelease-update-submodules-{stream}"
197
198     ######################
199     # Default parameters #
200     ######################
201
202     cron: "H 0 * * *"
203     disable-job: "false"
204
205     #####################
206     # Job configuration #
207     #####################
208
209     project-type: freestyle
210     node: centos7-builder-2c-2g
211     disabled: "{disable-job}"
212
213     properties:
214       - lf-infra-properties:
215           build-days-to-keep: 7
216
217     parameters:
218       - lf-infra-parameters:
219           project: releng/autorelease
220           branch: "{branch}"
221           stream: "{stream}"
222           refspec: "refs/heads/{branch}"
223           lftools-version: "{lftools-version}"
224
225     scm:
226       - lf-infra-gerrit-scm:
227           git-url: "$GIT_URL/$GERRIT_PROJECT"
228           branch: "{branch}"
229           refspec: "refs/heads/{branch}"
230           jenkins-ssh-credential: opendaylight-jenkins-ssh
231           submodule-disable: false
232           submodule-recursive: true
233           submodule-timeout: 10
234           choosing-strategy: default
235
236     wrappers:
237       - lf-infra-wrappers:
238           build-timeout: 10
239           jenkins-ssh-credential: opendaylight-jenkins-ssh
240
241     triggers:
242       - timed: "{obj:cron}"
243
244     builders:
245       - lf-infra-pre-build
246       # Fetch latest head of branch
247       - shell: |
248           git checkout $GERRIT_BRANCH
249           git submodule update --remote
250           git add .
251       - lf-infra-push-gerrit-patch:
252           project: "{project}"
253           gerrit-user: "jenkins-$SILO"
254           gerrit-host: "git.opendaylight.org"
255           gerrit-topic: "autorelease-update-submodules"
256           gerrit-commit-message: "Update submodules to latest HEAD of branch"
257           reviewers-email: "jenkins-releng@opendaylight.org"
258
259     publishers:
260       - lf-infra-publish
261
262 - job-template:
263     name: autorelease-update-validate-jobs-{stream}
264
265     ######################
266     # Default parameters #
267     ######################
268
269     cron: "@weekly"
270     disable-job: "false"
271
272     #####################
273     # Job configuration #
274     #####################
275
276     project-type: freestyle
277     node: centos7-builder-2c-1g
278     disabled: "{disable-job}"
279
280     properties:
281       - lf-infra-properties:
282           build-days-to-keep: 7
283
284     parameters:
285       - lf-infra-parameters:
286           project: releng/builder
287           branch: "{branch}"
288           stream: "{stream}"
289           lftools-version: "{lftools-version}"
290
291     scm:
292       - lf-infra-gerrit-scm:
293           git-url: "$GIT_URL/releng/builder"
294           branch: master
295           refspec: "refs/heads/master"
296           jenkins-ssh-credential: opendaylight-jenkins-ssh
297           submodule-disable: false
298           submodule-recursive: true
299           submodule-timeout: 10
300           choosing-strategy: default
301
302     triggers:
303       - timed: "{cron}"
304       - gerrit:
305           server-name: "{gerrit-server-name}"
306           trigger-on:
307             - change-merged-event
308             - comment-added-contains-event:
309                 comment-contains-value: remerge$
310           projects:
311             - project-compare-type: ANT
312               project-pattern: "{project}"
313               branches:
314                 - branch-compare-type: ANT
315                   branch-pattern: "**/{branch}"
316               file-paths:
317                 - compare-type: ANT
318                   pattern: pom.xml
319
320     wrappers:
321       - lf-infra-wrappers:
322           build-timeout: 10
323           jenkins-ssh-credential: opendaylight-jenkins-ssh
324
325     builders:
326       - lf-infra-pre-build
327       - autorelease-update-project-views
328       - autorelease-update-validate-projects
329       - lf-infra-push-gerrit-patch:
330           project: "{project}"
331           gerrit-user: "jenkins-$SILO"
332           gerrit-host: "git.opendaylight.org"
333           gerrit-topic: "autorelease-update-validate-jobs-{stream}"
334           gerrit-commit-message: "Update validate-ar jobs for {stream}"
335           reviewers-email: "jenkins-releng@opendaylight.org"
336
337     publishers:
338       - lf-infra-publish
339
340 - job-template:
341     name: autorelease-version-bump-{stream}-{mvn-version}-{java-version}
342
343     #####################
344     # Default variables #
345     #####################
346
347     mvn-global-settings: global-settings
348     mvn-settings: autorelease-settings
349     mvn-version: mvn35
350     disable-job: "false"
351
352     #####################
353     # Job configuration #
354     #####################
355
356     project-type: freestyle
357     node: "{build-node}"
358     disabled: "{disable-job}"
359
360     properties:
361       - opendaylight-infra-properties:
362           build-days-to-keep: 7
363
364     parameters:
365       - lf-infra-parameters:
366           project: releng/autorelease
367           branch: "{branch}"
368           stream: "{stream}"
369           refspec: "refs/heads/{branch}"
370           lftools-version: "{lftools-version}"
371       - string:
372           name: RELEASE_TAG
373           default: "{stream}"
374           description: |
375             Release that is being version bumped.
376             Eg. Lithium, Beryllium, Boron, Carbon, Carbon-SR1, Carbon-SR2...
377       - bool:
378           name: BRANCH_CUT
379           default: false
380           description: |
381             If BRANCH_CUT is enabled, perform version bump for branch cutting
382             workflow, else perform version bump for simultaneous release
383             workflow (detault).
384       - bool:
385           name: DRY_RUN
386           default: true
387           description: |
388             If DRY_RUN is enabled modifications are not published to Gerrit
389             and artifacts are not pushed to Nexus. Instead the build will be
390             performed using the goals "clean install".
391       - maven-exec:
392           maven-version: "{mvn-version}"
393
394     scm:
395       - lf-infra-gerrit-scm:
396           git-url: "$GIT_URL/$GERRIT_PROJECT"
397           branch: "{branch}"
398           refspec: "refs/heads/{branch}"
399           jenkins-ssh-credential: opendaylight-jenkins-ssh
400           submodule-disable: false
401           submodule-recursive: true
402           submodule-timeout: 10
403           choosing-strategy: default
404
405     wrappers:
406       - lf-infra-wrappers:
407           build-timeout: 480
408           jenkins-ssh-credential: opendaylight-jenkins-ssh
409
410     builders:
411       - lf-infra-pre-build
412       # force jenkins install of maven version before any shell scripts use it
413       - lf-update-java-alternatives:
414           java-version: "{java-version}"
415       - lf-maven-install:
416           mvn-version: "{mvn-version}"
417       - lf-provide-maven-settings:
418           global-settings-file: "{mvn-global-settings}"
419           settings-file: "{mvn-settings}"
420       - shell: !include-raw-escape:
421           - version-bump.sh
422
423     publishers:
424       - lf-infra-publish
425
426 - job-template:
427     name: "autorelease-generate-release-notes-{stream}"
428
429     ######################
430     # Default parameters #
431     ######################
432     disable-job: "false"
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: centos7-builder-2c-8g
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. Magnesium-SR2, Silicon-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: openjdk8
503     mvn-global-settings: global-settings
504     mvn-settings: autorelease-settings
505     mvn-version: mvn35
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: centos7-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