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