Merge "Update SFC netvirt CSIT with fluorine and queens"
[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           choosing-strategy: default
42
43     wrappers:
44       - lf-infra-wrappers:
45           build-timeout: 10
46           jenkins-ssh-credential: opendaylight-jenkins-ssh
47
48     builders:
49       - shell: !include-raw-escape: branch-cut.sh
50
51     publishers:
52       - lf-infra-publish
53
54 - job-template:
55     name: 'autorelease-release-{stream}'
56
57     ######################
58     # Default parameters #
59     ######################
60
61     build-node: '{build-node}'
62     cron: 'H 0 * * *'
63     java-version: openjdk8
64     mvn-version: mvn35
65     extra-mvn-opts: ''
66
67     #####################
68     # Job Configuration #
69     #####################
70
71     project-type: freestyle
72     node: '{build-node}'
73     jdk: '{java-version}'
74
75     properties:
76       - lf-infra-properties:
77           build-days-to-keep: 30
78
79     parameters:
80       - maven-exec:
81           maven-version: 'mvn35'
82       - lf-infra-parameters:
83           project: '{project}'
84           stream: '{stream}'
85           branch: '{branch}'
86           lftools-version: '{lftools-version}'
87       - distribution-karaf-version:
88           karaf-version: '{karaf-version}'
89       - autorelease-release-tag:
90           release-tag: '{next-release-tag}'
91       - string:
92           name: EXTRA_MVN_OPTS
93           default: '{extra-mvn-opts}'
94           description: |
95               Additional optional Maven Options to pass to the Maven Goals
96               parameter.
97
98               Examples:
99               -Dskip.karaf.featureTest=true  # To disable karaf SingleFeatureTests
100               --fail-never   # NEVER fail the build, regardless of project result
101               --fail-at-end  # Only fail the build afterwards; allow all non-impacted builds to continue
102       - string:
103           name: ARCHIVE_ARTIFACTS
104           default: '{archive-artifacts}'
105           description: Artifacts to archive to the logs server.
106
107     scm:
108       - git:
109           credentials-id: 'opendaylight-jenkins-ssh'
110           url: '$GIT_BASE'
111           refspec: '$GERRIT_REFSPEC'
112           branches:
113             - '$GERRIT_BRANCH'
114           choosing-strategy: default
115           skip-tag: true
116           submodule:
117             recursive: true
118             timeout: 60
119
120     wrappers:
121       - opendaylight-infra-wrappers:
122           build-timeout: '900'
123
124     triggers:
125       - timed: '{cron}'
126
127     builders:
128       # force jenkins install of maven version before any shell scripts use it
129       - lf-maven-install:
130           mvn-version: '{mvn-version}'
131       - wipe-local-maven-repo
132       - jacoco-nojava-workaround
133       - shell: "./scripts/list-project-dependencies.sh"
134       - autorelease-determine-merge-order
135       - autorelease-cfp:
136           autorelease-settings: 'autorelease-settings'
137           global-settings: 'odl-global-settings'
138       - autorelease-generate-release-patches
139       - autorelease-generate-artifact-versions
140       - autorelease-distribute-taglist
141       - distribute-build-url:
142           path: 'integration/distribution/$KARAF_ARTIFACT/src/main/assembly'
143       # In a perfect world projects should be releasing separately and we consume them
144       # via a project that pulls the release bits from each project from Nexus.
145       # Keep the patches compatible with that ideal, but apply an edit
146       # to enable building in a single maven reactor afterwards.
147       - autorelease-fix-relative-paths
148       - maven-target:
149           maven-version: 'mvn35'
150           pom: 'pom.xml'
151           goals: |
152               clean deploy
153               $EXTRA_MVN_OPTS
154               -Pintegrationtests,docs,repoBuild
155               -Dcheckstyle.skip=true
156               -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage
157               {opendaylight-infra-mvn-opts}
158           java-opts:
159             - '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
160           settings: 'autorelease-settings'
161           settings-type: cfp
162           global-settings: 'global-settings'
163           global-settings-type: cfp
164       - autorelease-maven-deploy
165       - autorelease-get-integration-test-variables
166       - autorelease-maven-sources:
167           opendaylight-infra-mvn-opts: '{opendaylight-infra-mvn-opts}'
168           maven-version: 'mvn35'
169           settings: 'autorelease-settings'
170           global-settings: 'global-settings'
171       - autorelease-maven-sources-post-process
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: 'integration-sanity-test-{integration-test}'
187             condition: UNSTABLE_OR_BETTER
188             property-file: variables.jenkins-trigger
189             fail-on-missing: true
190           - project: 'integration-sanity-test-{integration-test}'
191             condition: FAILED
192             trigger-with-no-params: true
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-validate-jobs-{stream}
216
217     ######################
218     # Default parameters #
219     ######################
220
221     cron: '@weekly'
222
223     #####################
224     # Job configuration #
225     #####################
226
227     project-type: freestyle
228     node: centos7-builder-2c-1g
229
230     properties:
231       - lf-infra-properties:
232           build-days-to-keep: 7
233
234     parameters:
235       - lf-infra-parameters:
236           project: releng/builder
237           branch: '{branch}'
238           stream: '{stream}'
239           lftools-version: '{lftools-version}'
240
241     scm:
242       - lf-infra-gerrit-scm:
243           git-url: '$GIT_URL/releng/builder'
244           branch: master
245           refspec: 'refs/heads/master'
246           jenkins-ssh-credential: opendaylight-jenkins-ssh
247           submodule-recursive: true
248           choosing-strategy: default
249
250     triggers:
251       - timed: '{cron}'
252       - gerrit:
253           server-name: '{gerrit-server-name}'
254           trigger-on:
255             - change-merged-event
256             - comment-added-contains-event:
257                 comment-contains-value: remerge$
258           projects:
259             - project-compare-type: ANT
260               project-pattern: '{project}'
261               branches:
262                 - branch-compare-type: ANT
263                   branch-pattern: '**/{branch}'
264               file-paths:
265                 - compare-type: ANT
266                   pattern: pom.xml
267
268     wrappers:
269       - lf-infra-wrappers:
270           build-timeout: 10
271           jenkins-ssh-credential: opendaylight-jenkins-ssh
272
273     builders:
274       - autorelease-update-validate-projects
275       - opendaylight-infra-push-gerrit-patch:
276           project: 'releng/builder'
277           gerrit-topic: 'autorelease-update-validate-jobs-{stream}'
278           gerrit-commit-message: |
279               Update validate autorelease projects for {stream}
280
281     publishers:
282       - lf-infra-publish
283
284 - job-template:
285     name: autorelease-version-bump-{stream}
286     project-type: freestyle
287     node: '{build-node}'
288
289     properties:
290       - opendaylight-infra-properties:
291           build-days-to-keep: 7
292
293     parameters:
294       - lf-infra-parameters:
295           project: releng/autorelease
296           branch: '{branch}'
297           stream: '{stream}'
298           refspec: 'refs/heads/{branch}'
299           lftools-version: '{lftools-version}'
300       - string:
301           name: RELEASE_TAG
302           default: '{next-release-tag}'
303           description: |
304               Release that is being version bumped.
305               Eg. Lithium, Beryllium, Boron, Carbon, Carbon-SR1, Carbon-SR2...
306       - bool:
307           name: BRANCH_CUT
308           default: false
309           description: |
310               If BRANCH_CUT is enabled, perform version bump for branch cutting
311               workflow, else perform version bump for simultaneous release
312               workflow (detault).
313       - bool:
314           name: DRY_RUN
315           default: true
316           description: |
317               If DRY_RUN is enabled modifications are not published to Gerrit
318               and artifacts are not pushed to Nexus. Instead the build will be
319               performed using the goals "clean install".
320       - maven-exec:
321           maven-version: mvn35
322
323     scm:
324       - lf-infra-gerrit-scm:
325           git-url: '$GIT_URL/$GERRIT_PROJECT'
326           branch: '{branch}'
327           refspec: 'refs/heads/{branch}'
328           jenkins-ssh-credential: opendaylight-jenkins-ssh
329           submodule-recursive: true
330           choosing-strategy: default
331
332     wrappers:
333       - lf-infra-wrappers:
334           build-timeout: 480
335           jenkins-ssh-credential: opendaylight-jenkins-ssh
336
337     builders:
338       # force jenkins install of maven version before any shell scripts use it
339       - maven-target:
340           maven-version: mvn35
341           goals: '-version'
342           settings: autorelease-settings
343           settings-type: cfp
344           global-settings: global-settings
345           global-settings-type: cfp
346       - autorelease-cfp
347       - shell: !include-raw-escape:
348           - ../global-jjb/shell/lftools-install.sh
349           - version-bump.sh
350
351     publishers:
352       - lf-infra-publish
353
354 - job-template:
355     name: 'autorelease-generate-release-notes-{stream}'
356
357     ######################
358     # Default parameters #
359     ######################
360
361     gerrit_merge_triggers:
362       - comment-added-contains-event:
363           comment-contains-value: generate-release-notes .+$
364
365     #####################
366     # Job Configuration #
367     #####################
368
369     project-type: freestyle
370     node: centos7-builder-2c-8g
371
372     properties:
373       - lf-infra-properties:
374           build-days-to-keep: 7
375
376     parameters:
377       - lf-infra-parameters:
378           project: '{project}'
379           branch: '{branch}'
380           stream: '{stream}'
381           lftools-version: '{lftools-version}'
382       - string:
383           name: RELEASE
384           description: Release to generate release notes for.
385
386     scm:
387       - lf-infra-gerrit-scm:
388           git-url: '$GIT_URL/$GERRIT_PROJECT'
389           branch: '$GERRIT_BRANCH'
390           refspec: '$GERRIT_REFSPEC'
391           jenkins-ssh-credential: opendaylight-jenkins-ssh
392           submodule-recursive: true
393           choosing-strategy: default
394
395     wrappers:
396       - lf-infra-wrappers:
397           build-timeout: 10
398           jenkins-ssh-credential: opendaylight-jenkins-ssh
399
400     triggers:
401       - gerrit:
402           server-name: '{gerrit-server-name}'
403           trigger-on: '{obj:gerrit_merge_triggers}'
404           projects:
405             - project-compare-type: ANT
406               project-pattern: '{project}'
407               branches:
408                 - branch-compare-type: ANT
409                   branch-pattern: '**/{branch}'
410
411     builders:
412       - autorelease-generate-release-notes
413
414     publishers:
415       - lf-infra-publish
416
417 - job-template:
418     name: '{project-name}-validate-autorelease-{stream}'
419
420     ############
421     # Defaults #
422     ############
423
424     java-version: openjdk8
425
426     #####################
427     # Job Configuration #
428     #####################
429
430     disabled: false
431     project-type: freestyle
432     # Note: This NEEDS to be hardcoded as projects should NOT be allowed to
433     #       override the build node.
434     node: centos7-builder-2c-8g
435     concurrent: true
436     jdk: '{java-version}'
437
438     properties:
439       - lf-infra-properties:
440           build-days-to-keep: 7
441
442     parameters:
443       - lf-infra-parameters:
444           project: '{project}'
445           stream: '{stream}'
446           branch: '{branch}'
447           lftools-version: '{lftools-version}'
448       - autorelease-release-tag:
449           release-tag: validate
450       - string:
451           name: CLONE_URL
452           default: '{git-url}/releng/autorelease'
453           description: "Autorelease clone URL"
454
455     scm:
456       - git:
457           url: '$CLONE_URL'
458           credentials-id: 'opendaylight-jenkins-ssh'
459           refspec: ''
460           branches:
461             - 'origin/{branch}'
462           skip-tag: true
463           submodule:
464             recursive: true
465             timeout: 60
466
467     wrappers:
468       - opendaylight-infra-wrappers:
469           build-timeout: '{build-timeout}'
470
471     triggers:
472       - gerrit-trigger-patch-submitted:
473           gerrit-server-name: '{gerrit-server-name}'
474           project: '{project}'
475           branch: '{branch}'
476           files: '**/*.xml'
477
478     builders:
479       - autorelease-checkout-gerrit-patch
480       - autorelease-compare-projects
481       - jacoco-nojava-workaround
482       - shell: "./scripts/list-project-dependencies.sh"
483       - autorelease-determine-merge-order
484       - autorelease-generate-release-patches
485       # In a perfect world projects should be releasing separately and we consume them
486       # via a project that pulls the release bits from each project from Nexus.
487       # Keep the patches compatible with that ideal, but apply an edit
488       # to enable building in a single maven reactor afterwards.
489       - autorelease-fix-relative-paths
490       - maven-target:
491           maven-version: mvn35
492           pom: validate-pom.xml
493           goals: |
494               clean install dependency:tree
495               -T1.5C
496               -Pq
497               {opendaylight-infra-mvn-opts}
498           java-opts:
499             - '-Xmx8g'
500           settings: autorelease-settings
501           settings-type: cfp
502           global-settings: global-settings
503           global-settings-type: cfp
504       # Hack to workaround the duplicate-finder plugin in odlparent breaking validate-autorelease
505       - shell: sed -i 's/validate/none/' /tmp/r/org/opendaylight/odlparent/odlparent/3.0.2/odlparent-3.0.2.pom || true
506       - maven-target:
507           maven-version: mvn35
508           pom: pom.xml
509           goals: |
510               clean validate
511               -Pq
512               {opendaylight-infra-mvn-opts}
513           java-opts:
514             - '-Xmx8g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
515           settings: autorelease-settings
516           settings-type: cfp
517           global-settings: global-settings
518           global-settings-type: cfp
519       - shell: |
520           mkdir -p archives/
521           cp *.log $_
522
523     publishers:
524       - email-notification:
525           email-recipients: '{email-recipients}'
526           email-prefix: '[autorelease] [{project-name}]'
527       - lf-infra-publish