Remove all references to -XX:MaxPermSize
[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           - project: 'packaging-build-rpm-{stream}'
185             condition: UNSTABLE_OR_BETTER
186             predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL
187             property-file: variables.jenkins-trigger
188             fail-on-missing: true
189           - project: 'packaging-build-deb-{stream}'
190             condition: UNSTABLE_OR_BETTER
191             predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL
192             property-file: variables.jenkins-trigger
193             fail-on-missing: true
194       # Critical component of the OpenDaylight community
195       - postbuildscript:
196           builders:
197             - role: BOTH
198               build-on:
199                 - SUCCESS
200               build-steps:
201                 - shell: echo '#topic cookies'
202           mark-unstable-if-failed: false
203       - lf-infra-publish
204
205 - job-template:
206     name: 'autorelease-update-submodules-{stream}'
207
208     ######################
209     # Default parameters #
210     ######################
211
212     cron: 'H 0 * * *'
213     disable-job: 'false'
214
215     #####################
216     # Job configuration #
217     #####################
218
219     project-type: freestyle
220     node: centos7-builder-2c-2g
221     disabled: '{disable-job}'
222
223     properties:
224       - lf-infra-properties:
225           build-days-to-keep: 7
226
227     parameters:
228       - lf-infra-parameters:
229           project: releng/autorelease
230           branch: '{branch}'
231           stream: '{stream}'
232           refspec: 'refs/heads/{branch}'
233           lftools-version: '{lftools-version}'
234
235     scm:
236       - lf-infra-gerrit-scm:
237           git-url: '$GIT_URL/$GERRIT_PROJECT'
238           branch: '{branch}'
239           refspec: 'refs/heads/{branch}'
240           jenkins-ssh-credential: opendaylight-jenkins-ssh
241           submodule-disable: false
242           submodule-recursive: true
243           submodule-timeout: 10
244           choosing-strategy: default
245
246     wrappers:
247       - lf-infra-wrappers:
248           build-timeout: 10
249           jenkins-ssh-credential: opendaylight-jenkins-ssh
250
251     triggers:
252       - timed: '{obj:cron}'
253
254     builders:
255       - lf-infra-pre-build
256       # Fetch latest head of branch
257       - shell: |
258           git checkout $GERRIT_BRANCH
259           git submodule update --remote
260           git add .
261       - lf-infra-push-gerrit-patch:
262           project: '{project}'
263           gerrit-user: 'jenkins-$SILO'
264           gerrit-host: 'git.opendaylight.org'
265           gerrit-topic: 'autorelease-update-submodules'
266           gerrit-commit-message: 'Update submodules to latest HEAD of branch'
267           reviewers-email: ''
268
269     publishers:
270       - lf-infra-publish
271
272 - job-template:
273     name: autorelease-update-validate-jobs-{stream}
274
275     ######################
276     # Default parameters #
277     ######################
278
279     cron: '@weekly'
280     disable-job: 'false'
281
282     #####################
283     # Job configuration #
284     #####################
285
286     project-type: freestyle
287     node: centos7-builder-2c-1g
288     disabled: '{disable-job}'
289
290     properties:
291       - lf-infra-properties:
292           build-days-to-keep: 7
293
294     parameters:
295       - lf-infra-parameters:
296           project: releng/builder
297           branch: '{branch}'
298           stream: '{stream}'
299           lftools-version: '{lftools-version}'
300
301     scm:
302       - lf-infra-gerrit-scm:
303           git-url: '$GIT_URL/releng/builder'
304           branch: master
305           refspec: 'refs/heads/master'
306           jenkins-ssh-credential: opendaylight-jenkins-ssh
307           submodule-disable: false
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-disable: false
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     disable-job: 'false'
442
443     gerrit_merge_triggers:
444       - comment-added-contains-event:
445           comment-contains-value: generate-release-notes .+$
446
447     #####################
448     # Job Configuration #
449     #####################
450
451     project-type: freestyle
452     node: centos7-builder-2c-8g
453     disabled: '{disable-job}'
454
455     properties:
456       - lf-infra-properties:
457           build-days-to-keep: 7
458
459     parameters:
460       - lf-infra-parameters:
461           project: '{project}'
462           branch: '{branch}'
463           stream: '{stream}'
464           lftools-version: '{lftools-version}'
465       - string:
466           name: RELEASE
467           description: |
468               Release to generate release notes for.
469               Eg. Neon-SR1, Fluorine-SR2...
470     scm:
471       - lf-infra-gerrit-scm:
472           git-url: '$GIT_URL/$GERRIT_PROJECT'
473           branch: '$GERRIT_BRANCH'
474           refspec: '$GERRIT_REFSPEC'
475           jenkins-ssh-credential: opendaylight-jenkins-ssh
476           submodule-disable: false
477           submodule-recursive: true
478           submodule-timeout: 10
479           choosing-strategy: default
480
481     wrappers:
482       - lf-infra-wrappers:
483           build-timeout: 10
484           jenkins-ssh-credential: opendaylight-jenkins-ssh
485
486     triggers:
487       - gerrit:
488           server-name: '{gerrit-server-name}'
489           trigger-on: '{obj:gerrit_merge_triggers}'
490           projects:
491             - project-compare-type: ANT
492               project-pattern: '{project}'
493               branches:
494                 - branch-compare-type: ANT
495                   branch-pattern: '**/{branch}'
496
497     builders:
498       - lf-infra-pre-build
499       - autorelease-generate-release-notes
500
501     publishers:
502       - lf-infra-publish
503
504 - job-template:
505     name: '{project-name}-validate-autorelease-{stream}'
506
507     #####################
508     # Default variables #
509     #####################
510
511     java-version: openjdk8
512     mvn-global-settings: global-settings
513     mvn-settings: autorelease-settings
514     mvn-version: mvn35
515     disable-job: 'false'
516
517     #####################
518     # Job Configuration #
519     #####################
520
521     project-type: freestyle
522     # Note: This NEEDS to be hardcoded as projects should NOT be allowed to
523     #       override the build node.
524     node: centos7-builder-2c-8g
525     concurrent: true
526     jdk: '{java-version}'
527     disabled: '{disable-job}'
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 -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