Remove parameter in autorelease build trigger
[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: STABLE
192             predefined-parameters: BUNDLE_URL=autorelease
193           - project: 'packaging-build-rpm-{stream}'
194             condition: UNSTABLE_OR_BETTER
195             predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL
196             property-file: variables.jenkins-trigger
197             fail-on-missing: true
198           - project: 'packaging-build-deb-{stream}'
199             condition: UNSTABLE_OR_BETTER
200             predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL
201             property-file: variables.jenkins-trigger
202             fail-on-missing: true
203       # Critical component of the OpenDaylight community
204       - postbuildscript:
205           builders:
206             - role: BOTH
207               build-on:
208                 - SUCCESS
209               build-steps:
210                 - shell: echo '#topic cookies'
211           mark-unstable-if-failed: false
212       - lf-infra-publish
213
214 - job-template:
215     name: 'autorelease-update-submodules-{stream}'
216
217     ######################
218     # Default parameters #
219     ######################
220
221     cron: 'H 0 * * *'
222
223     #####################
224     # Job configuration #
225     #####################
226
227     project-type: freestyle
228     node: centos7-builder-2c-2g
229
230     properties:
231       - lf-infra-properties:
232           build-days-to-keep: 7
233
234     parameters:
235       - lf-infra-parameters:
236           project: releng/autorelease
237           branch: '{branch}'
238           stream: '{stream}'
239           refspec: 'refs/heads/{branch}'
240           lftools-version: '{lftools-version}'
241
242     scm:
243       - lf-infra-gerrit-scm:
244           git-url: '$GIT_URL/$GERRIT_PROJECT'
245           branch: '{branch}'
246           refspec: 'refs/heads/{branch}'
247           jenkins-ssh-credential: opendaylight-jenkins-ssh
248           submodule-recursive: true
249           submodule-timeout: 10
250           choosing-strategy: default
251
252     wrappers:
253       - lf-infra-wrappers:
254           build-timeout: 10
255           jenkins-ssh-credential: opendaylight-jenkins-ssh
256
257     triggers:
258       - timed: '{obj:cron}'
259
260     builders:
261       - lf-infra-pre-build
262       # Fetch latest head of branch
263       - shell: |
264           git checkout $GERRIT_BRANCH
265           git submodule update --remote
266           git add .
267       - lf-infra-push-gerrit-patch:
268           project: '{project}'
269           gerrit-user: 'jenkins-$SILO'
270           gerrit-host: 'git.opendaylight.org'
271           gerrit-topic: 'autorelease-update-submodules'
272           gerrit-commit-message: 'Update submodules to latest HEAD of branch'
273           reviewers-email: ''
274
275     publishers:
276       - lf-infra-publish
277
278 - job-template:
279     name: autorelease-update-validate-jobs-{stream}
280
281     ######################
282     # Default parameters #
283     ######################
284
285     cron: '@weekly'
286
287     #####################
288     # Job configuration #
289     #####################
290
291     project-type: freestyle
292     node: centos7-builder-2c-1g
293
294     properties:
295       - lf-infra-properties:
296           build-days-to-keep: 7
297
298     parameters:
299       - lf-infra-parameters:
300           project: releng/builder
301           branch: '{branch}'
302           stream: '{stream}'
303           lftools-version: '{lftools-version}'
304
305     scm:
306       - lf-infra-gerrit-scm:
307           git-url: '$GIT_URL/releng/builder'
308           branch: master
309           refspec: 'refs/heads/master'
310           jenkins-ssh-credential: opendaylight-jenkins-ssh
311           submodule-recursive: true
312           submodule-timeout: 10
313           choosing-strategy: default
314
315     triggers:
316       - timed: '{cron}'
317       - gerrit:
318           server-name: '{gerrit-server-name}'
319           trigger-on:
320             - change-merged-event
321             - comment-added-contains-event:
322                 comment-contains-value: remerge$
323           projects:
324             - project-compare-type: ANT
325               project-pattern: '{project}'
326               branches:
327                 - branch-compare-type: ANT
328                   branch-pattern: '**/{branch}'
329               file-paths:
330                 - compare-type: ANT
331                   pattern: pom.xml
332
333     wrappers:
334       - lf-infra-wrappers:
335           build-timeout: 10
336           jenkins-ssh-credential: opendaylight-jenkins-ssh
337
338     builders:
339       - lf-infra-pre-build
340       - autorelease-update-project-views
341       - autorelease-update-validate-projects
342       - lf-infra-push-gerrit-patch:
343           project: '{project}'
344           gerrit-user: 'jenkins-$SILO'
345           gerrit-host: 'git.opendaylight.org'
346           gerrit-topic: 'autorelease-update-validate-jobs-{stream}'
347           gerrit-commit-message: |
348               'Update validate autorelease projects for {stream}'
349           reviewers-email: 'jenkins-releng@opendaylight.org'
350
351     publishers:
352       - lf-infra-publish
353
354 - job-template:
355     name: autorelease-version-bump-{stream}
356
357     #####################
358     # Default variables #
359     #####################
360
361     mvn-global-settings: global-settings
362     mvn-settings: autorelease-settings
363     mvn-version: mvn35
364
365     #####################
366     # Job configuration #
367     #####################
368
369     project-type: freestyle
370     node: '{build-node}'
371
372     properties:
373       - opendaylight-infra-properties:
374           build-days-to-keep: 7
375
376     parameters:
377       - lf-infra-parameters:
378           project: releng/autorelease
379           branch: '{branch}'
380           stream: '{stream}'
381           refspec: 'refs/heads/{branch}'
382           lftools-version: '{lftools-version}'
383       - string:
384           name: RELEASE_TAG
385           default: '{stream}'
386           description: |
387               Release that is being version bumped.
388               Eg. Lithium, Beryllium, Boron, Carbon, Carbon-SR1, Carbon-SR2...
389       - bool:
390           name: BRANCH_CUT
391           default: false
392           description: |
393               If BRANCH_CUT is enabled, perform version bump for branch cutting
394               workflow, else perform version bump for simultaneous release
395               workflow (detault).
396       - bool:
397           name: DRY_RUN
398           default: true
399           description: |
400               If DRY_RUN is enabled modifications are not published to Gerrit
401               and artifacts are not pushed to Nexus. Instead the build will be
402               performed using the goals "clean install".
403       - maven-exec:
404           maven-version: '{mvn-version}'
405
406     scm:
407       - lf-infra-gerrit-scm:
408           git-url: '$GIT_URL/$GERRIT_PROJECT'
409           branch: '{branch}'
410           refspec: 'refs/heads/{branch}'
411           jenkins-ssh-credential: opendaylight-jenkins-ssh
412           submodule-recursive: true
413           submodule-timeout: 10
414           choosing-strategy: default
415
416     wrappers:
417       - lf-infra-wrappers:
418           build-timeout: 480
419           jenkins-ssh-credential: opendaylight-jenkins-ssh
420
421     builders:
422       - lf-infra-pre-build
423       # force jenkins install of maven version before any shell scripts use it
424       - lf-maven-install:
425           mvn-version: '{mvn-version}'
426       - lf-provide-maven-settings:
427           global-settings-file: '{mvn-global-settings}'
428           settings-file: '{mvn-settings}'
429       - shell: !include-raw-escape:
430           - version-bump.sh
431
432     publishers:
433       - lf-infra-publish
434
435 - job-template:
436     name: 'autorelease-generate-release-notes-{stream}'
437
438     ######################
439     # Default parameters #
440     ######################
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
453     properties:
454       - lf-infra-properties:
455           build-days-to-keep: 7
456
457     parameters:
458       - lf-infra-parameters:
459           project: '{project}'
460           branch: '{branch}'
461           stream: '{stream}'
462           lftools-version: '{lftools-version}'
463       - string:
464           name: RELEASE
465           description: |
466               Release to generate release notes for.
467               Eg. Oxygen-SR1, Fluorine-SR2...
468     scm:
469       - lf-infra-gerrit-scm:
470           git-url: '$GIT_URL/$GERRIT_PROJECT'
471           branch: '$GERRIT_BRANCH'
472           refspec: '$GERRIT_REFSPEC'
473           jenkins-ssh-credential: opendaylight-jenkins-ssh
474           submodule-recursive: true
475           submodule-timeout: 10
476           choosing-strategy: default
477
478     wrappers:
479       - lf-infra-wrappers:
480           build-timeout: 10
481           jenkins-ssh-credential: opendaylight-jenkins-ssh
482
483     triggers:
484       - gerrit:
485           server-name: '{gerrit-server-name}'
486           trigger-on: '{obj:gerrit_merge_triggers}'
487           projects:
488             - project-compare-type: ANT
489               project-pattern: '{project}'
490               branches:
491                 - branch-compare-type: ANT
492                   branch-pattern: '**/{branch}'
493
494     builders:
495       - lf-infra-pre-build
496       - autorelease-generate-release-notes
497
498     publishers:
499       - lf-infra-publish
500
501 - job-template:
502     name: '{project-name}-validate-autorelease-{stream}'
503
504     #####################
505     # Default variables #
506     #####################
507
508     java-version: openjdk8
509     mvn-global-settings: global-settings
510     mvn-settings: autorelease-settings
511     mvn-version: mvn35
512
513     #####################
514     # Job Configuration #
515     #####################
516
517     disabled: false
518     project-type: freestyle
519     # Note: This NEEDS to be hardcoded as projects should NOT be allowed to
520     #       override the build node.
521     node: centos7-builder-2c-8g
522     concurrent: true
523     jdk: '{java-version}'
524
525     properties:
526       - lf-infra-properties:
527           build-days-to-keep: 7
528
529     parameters:
530       - lf-infra-parameters:
531           project: '{project}'
532           stream: '{stream}'
533           branch: '{branch}'
534           lftools-version: '{lftools-version}'
535       - autorelease-release-tag:
536           release-tag: validate
537       - string:
538           name: CLONE_URL
539           default: '{git-url}/releng/autorelease'
540           description: "Autorelease clone URL"
541
542     scm:
543       - git:
544           url: '$CLONE_URL'
545           credentials-id: 'opendaylight-jenkins-ssh'
546           refspec: ''
547           branches:
548             - 'origin/{branch}'
549           skip-tag: true
550           submodule:
551             recursive: true
552             timeout: 60
553
554     wrappers:
555       - opendaylight-infra-wrappers:
556           build-timeout: '{build-timeout}'
557
558     triggers:
559       - gerrit-trigger-patch-submitted:
560           gerrit-server-name: '{gerrit-server-name}'
561           project: '{project}'
562           branch: '{branch}'
563           files: '**/*.xml'
564           forbidden-files: ''
565
566     builders:
567       - lf-infra-pre-build
568       - autorelease-checkout-gerrit-patch
569       - autorelease-compare-projects
570       - lf-jacoco-nojava-workaround
571       - shell: "./scripts/list-project-dependencies.sh"
572       - autorelease-determine-merge-order
573       - autorelease-generate-release-patches
574       # In a perfect world projects should be releasing separately and we consume them
575       # via a project that pulls the release bits from each project from Nexus.
576       # Keep the patches compatible with that ideal, but apply an edit
577       # to enable building in a single maven reactor afterwards.
578       - autorelease-fix-relative-paths
579       - maven-target:
580           maven-version: '{mvn-version}'
581           pom: validate-pom.xml
582           goals: |
583               clean install dependency:tree
584               -T1.5C
585               -Pq
586               {opendaylight-infra-mvn-opts}
587           java-opts:
588             - '-Xmx8g'
589           settings: '{mvn-settings}'
590           settings-type: cfp
591           global-settings: '{mvn-global-settings}'
592           global-settings-type: cfp
593       - maven-target:
594           maven-version: '{mvn-version}'
595           pom: pom.xml
596           goals: |
597               clean validate
598               -Pq
599               {opendaylight-infra-mvn-opts}
600           java-opts:
601             - '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
602           settings: '{mvn-settings}'
603           settings-type: cfp
604           global-settings: '{mvn-global-settings}'
605           global-settings-type: cfp
606       - shell: |
607           mkdir -p archives/
608           cp *.log $_
609
610     publishers:
611       - email-notification:
612           email-recipients: '{email-recipients}'
613           email-prefix: '[autorelease] [{project-name}]'
614       - lf-infra-publish