73466d635820628f4013c1e988692f3afb676a88
[releng/builder.git] / jjb / autorelease / autorelease-templates.yaml
1 ---
2 # Autorelease build jobs
3 - job-template:
4     name: 'autorelease-release-{stream}'
5
6     project-type: freestyle
7     node: centos7-autorelease-4c-16g
8     jdk: '{jdk}'
9     cron: 'H 0 * * *'
10
11     # Default variable values
12     extra-mvn-opts: ''
13
14     properties:
15       - opendaylight-infra-properties:
16           build-days-to-keep: '30'
17
18     parameters:
19       - maven-exec:
20           maven-version: 'mvn33'
21       - opendaylight-infra-parameters:
22           os-cloud: '{os-cloud}'
23           project: '{project}'
24           branch: '{branch}'
25           refspec: 'refs/heads/{branch}'
26           artifacts: '{archive-artifacts}'
27       - distribution-karaf-version:
28           karaf-version: '{karaf-version}'
29       - autorelease-release-tag:
30           release-tag: '{next-release-tag}'
31       - autorelease-release-branch:
32           release-branch: '{branch}'
33       - string:
34           name: EXTRA_MVN_OPTS
35           default: '{extra-mvn-opts}'
36           description: |
37               Additional optional Maven Options to pass to the Maven Goals
38               parameter.
39
40               Examples:
41               -Dskip.karaf.featureTest=true  # To disable karaf SingleFeatureTests
42               --fail-never   # NEVER fail the build, regardless of project result
43               --fail-at-end  # Only fail the build afterwards; allow all non-impacted builds to continue
44
45     scm:
46       - git:
47           credentials-id: 'opendaylight-jenkins-ssh'
48           url: '$GIT_BASE'
49           refspec: '$GERRIT_REFSPEC'
50           branches:
51             - '$GERRIT_BRANCH'
52           choosing-strategy: 'gerrit'
53           skip-tag: true
54           submodule:
55             recursive: true
56             timeout: 60
57
58     wrappers:
59       - opendaylight-infra-wrappers:
60           build-timeout: '900'
61
62     triggers:
63       - timed: '{cron}'
64
65     builders:
66       # force jenkins install of maven version before any shell scripts use it
67       - maven-target:
68           maven-version: 'mvn33'
69           goals: '-version'
70           settings: 'autorelease-settings'
71           settings-type: cfp
72           global-settings: 'global-settings'
73           global-settings-type: cfp
74       - wipe-local-maven-repo
75       - jacoco-nojava-workaround
76       - shell: "./scripts/list-project-dependencies.sh"
77       - autorelease-determine-merge-order
78       - autorelease-cfp:
79           autorelease-settings: 'autorelease-settings'
80           global-settings: 'odl-global-settings'
81       - autorelease-generate-taglist
82       - autorelease-distribute-taglist
83       - distribute-build-url:
84           path: 'integration/distribution/$KARAF_ARTIFACT/src/main/assembly'
85       - autorelease-generate-release-patches
86       # In a perfect world projects should be releasing separately and we consume them
87       # via a project that pulls the release bits from each project from Nexus.
88       # Keep the patches compatible with that ideal, but apply an edit
89       # to enable building in a single maven reactor afterwards.
90       - autorelease-fix-relative-paths
91       - maven-target:
92           maven-version: 'mvn33'
93           pom: 'pom.xml'
94           goals: |
95               clean deploy
96               $EXTRA_MVN_OPTS
97               -Pintegrationtests,docs,repoBuild
98               -Dcheckstyle.skip=true
99               -DaltDeploymentRepository=staging::default::file:hide/from/pom/files/stage
100               {opendaylight-infra-mvn-opts}
101           java-opts:
102             - '-Xmx10g -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
103           settings: 'autorelease-settings'
104           settings-type: cfp
105           global-settings: 'global-settings'
106           global-settings-type: cfp
107       - autorelease-maven-deploy
108       - autorelease-get-integration-test-variables
109       - autorelease-maven-sources:
110           opendaylight-infra-mvn-opts: '{opendaylight-infra-mvn-opts}'
111           maven-version: 'mvn33'
112           settings: 'autorelease-settings'
113           global-settings: 'global-settings'
114       - autorelease-maven-sources-post-process
115       - shell: |
116           mkdir -p archives/
117           cp *.log *.prop $_
118
119     publishers:
120       - opendaylight-infra-notify-status
121       - trigger-parameterized-builds:
122           - project: 'integration-distribution-test-{integration-test}'
123             condition: UNSTABLE_OR_BETTER
124             property-file: variables.jenkins-trigger
125             fail-on-missing: true
126           - project: 'integration-distribution-test-{integration-test}'
127             condition: FAILED
128             trigger-with-no-params: true
129           - project: 'integration-sanity-test-{integration-test}'
130             condition: UNSTABLE_OR_BETTER
131             property-file: variables.jenkins-trigger
132             fail-on-missing: true
133           - project: 'integration-sanity-test-{integration-test}'
134             condition: FAILED
135             trigger-with-no-params: true
136           - project: 'packaging-build-rpm-{stream}'
137             condition: UNSTABLE_OR_BETTER
138             predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL
139             property-file: variables.jenkins-trigger
140             fail-on-missing: true
141       - lf-infra-publish
142
143 - job-template:
144     name: autorelease-version-bump-{stream}
145     project-type: freestyle
146     node: centos7-autorelease-4c-16g
147
148     properties:
149       - opendaylight-infra-properties:
150           build-days-to-keep: 7
151
152     parameters:
153       - lf-infra-parameters:
154           project: releng/autorelease
155           branch: '{branch}'
156           stream: '{stream}'
157           refspec: 'refs/heads/{branch}'
158       - string:
159           name: RELEASE_TAG
160           default: '{next-release-tag}'
161           description: |
162               Release that is being version bumped.
163               Eg. Lithium, Beryllium, Boron, Carbon, Carbon-SR1, Carbon-SR2...
164       - bool:
165           name: DRY_RUN
166           default: true
167           description: |
168               If DRY_RUN is enabled modifications are not published to Gerrit.
169       - maven-exec:
170           maven-version: mvn33
171
172     scm:
173       - lf-infra-gerrit-scm:
174           git-url: '$GIT_URL/$GERRIT_PROJECT'
175           branch: '{branch}'
176           refspec: 'refs/heads/{branch}'
177           jenkins-ssh-credential: opendaylight-jenkins-ssh
178           submodule-recursive: true
179           choosing-strategy: default
180
181     wrappers:
182       - lf-infra-wrappers:
183           build-timeout: 240
184           jenkins-ssh-credential: opendaylight-jenkins-ssh
185
186     builders:
187       # force jenkins install of maven version before any shell scripts use it
188       - maven-target:
189           maven-version: mvn33
190           goals: '-version'
191           settings: autorelease-settings
192           settings-type: cfp
193           global-settings: global-settings
194           global-settings-type: cfp
195       - autorelease-cfp
196       - shell: !include-raw-escape:
197           - ../global-jjb/shell/lftools-install.sh
198           - version-bump.sh
199
200     publishers:
201       - trigger-parameterized-builds:
202           - project: 'autorelease-generate-release-notes-{stream}'
203             condition: UNSTABLE_OR_BETTER
204             trigger-with-no-params: true
205       - lf-infra-publish
206
207 - job-template:
208     name: 'autorelease-generate-release-notes-{stream}'
209
210     project-type: freestyle
211     node: centos7-java-builder-2c-4g
212
213     properties:
214       - lf-infra-properties:
215           build-days-to-keep: 7
216
217     parameters:
218       - lf-infra-parameters:
219           project: '{project}'
220           branch: '{branch}'
221           stream: '{stream}'
222
223     scm:
224       - lf-infra-gerrit-scm:
225           git-url: '$GIT_URL/$GERRIT_PROJECT'
226           branch: '{branch}'
227           refspec: 'refs/heads/{branch}'
228           jenkins-ssh-credential: opendaylight-jenkins-ssh
229           submodule-recursive: true
230           choosing-strategy: default
231
232     wrappers:
233       - lf-infra-wrappers:
234           build-timeout: 10
235           jenkins-ssh-credential: opendaylight-jenkins-ssh
236
237     triggers:
238       - timed: '0 0 * * 0'
239
240     builders:
241       - lf-maven-install:
242           mvn-version: mvn33
243       - maven-target:
244           maven-version: mvn33
245           pom: '$WORKSPACE/scripts/release_notes_management/pom.xml'
246           goals: |
247               clean package
248               {opendaylight-infra-mvn-opts}
249           settings: autorelease-settings
250           settings-type: cfp
251           global-settings: global-settings
252           global-settings-type: cfp
253       - autorelease-generate-release-notes
254
255     publishers:
256       - lf-infra-publish