Merge "Make Boron autorelease run weekly"
[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: 'odl-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           odl-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: 'odl-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: 'odl-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       - opendaylight-infra-sysstats
122       - archive:
123           # Need to archive dependencies.log in Jenkins to provide a simple
124           # way for downstream jobs to pull the latest version of this file
125           # in their builds.
126           artifacts: 'dependencies.log'
127       - trigger-parameterized-builds:
128           - project: 'autorelease-generate-release-notes-{stream}'
129             condition: UNSTABLE_OR_BETTER
130             property-file: variables.jenkins-trigger
131             fail-on-missing: true
132           - project: 'integration-distribution-test-{integration-test}'
133             condition: UNSTABLE_OR_BETTER
134             property-file: variables.jenkins-trigger
135             fail-on-missing: true
136           - project: 'integration-distribution-test-{integration-test}'
137             condition: FAILED
138             trigger-with-no-params: true
139           - project: 'integration-sanity-test-{integration-test}'
140             condition: UNSTABLE_OR_BETTER
141             property-file: variables.jenkins-trigger
142             fail-on-missing: true
143           - project: 'integration-sanity-test-{integration-test}'
144             condition: FAILED
145             trigger-with-no-params: true
146           - project: 'packaging-build-rpm-master'
147             condition: UNSTABLE_OR_BETTER
148             predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL
149             property-file: variables.jenkins-trigger
150             fail-on-missing: true
151       - lf-infra-publish
152
153 - job-template:
154     name: autorelease-version-bump-{stream}
155     project-type: freestyle
156     node: centos7-autorelease-4c-16g
157
158     properties:
159       - opendaylight-infra-properties:
160           build-days-to-keep: 7
161
162     parameters:
163       - lf-infra-parameters:
164           project: releng/autorelease
165           branch: '{branch}'
166           refspec: 'refs/heads/{branch}'
167       - string:
168           name: RELEASE_TAG
169           default: '{next-release-tag}'
170           description: |
171               Release that is being version bumped.
172               Eg. Lithium, Beryllium, Boron, Carbon, Carbon-SR1, Carbon-SR2...
173       - bool:
174           name: DRY_RUN
175           default: true
176           description: |
177               If DRY_RUN is enabled modifications are not published to Gerrit.
178       - maven-exec:
179           maven-version: mvn33
180
181     scm:
182       - lf-infra-gerrit-scm:
183           git-url: '$GIT_URL/$GERRIT_PROJECT'
184           branch: '{branch}'
185           refspec: 'refs/heads/{branch}'
186           jenkins-ssh-credential: opendaylight-jenkins-ssh
187           submodule-recursive: true
188           choosing-strategy: default
189
190     wrappers:
191       - lf-infra-wrappers:
192           build-timeout: 240
193           jenkins-ssh-credential: opendaylight-jenkins-ssh
194
195     builders:
196       # force jenkins install of maven version before any shell scripts use it
197       - maven-target:
198           maven-version: mvn33
199           goals: '-version'
200           settings: autorelease-settings
201           settings-type: cfp
202           global-settings: odl-global-settings
203           global-settings-type: cfp
204       - autorelease-cfp
205       - shell: !include-raw-escape:
206           - ../global-jjb/shell/lftools-install.sh
207           - version-bump.sh
208
209     publishers:
210       - lf-infra-publish
211
212 - job-template:
213     name: 'autorelease-generate-release-notes-{stream}'
214
215     project-type: freestyle
216     node: centos7-java-builder-2c-4g
217
218     properties:
219       - lf-infra-properties:
220           build-days-to-keep: 7
221
222     parameters:
223       - lf-infra-parameters:
224           project: '{project}'
225           branch: '{branch}'
226
227     scm:
228       - lf-infra-gerrit-scm:
229           git-url: '$GIT_URL/$GERRIT_PROJECT'
230           branch: '{branch}'
231           refspec: 'refs/heads/{branch}'
232           jenkins-ssh-credential: opendaylight-jenkins-ssh
233           submodule-recursive: true
234           choosing-strategy: default
235
236     wrappers:
237       - lf-infra-wrappers:
238           build-timeout: 10
239           jenkins-ssh-credential: opendaylight-jenkins-ssh
240
241     triggers:
242       - timed: '0 0 * * 0'
243
244     builders:
245       - lf-maven-install:
246           maven-version: mvn33
247       - maven-target:
248           maven-version: mvn33
249           pom: '$WORKSPACE/scripts/release_notes_management/pom.xml'
250           goals: |
251               clean package
252               {opendaylight-infra-mvn-opts}
253           settings: autorelease-settings
254           settings-type: cfp
255           global-settings: odl-global-settings
256           global-settings-type: cfp
257       - autorelease-generate-release-notes
258
259     publishers:
260       - opendaylight-infra-sysstats
261       - lf-infra-publish