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