4a62e56b995d94310c82ce6d7d115faf47c6ca92
[releng/builder.git] / jjb / integration / distribution-jobs.yaml
1 ---
2 - project:
3     name: distribution-jobs
4     jobs:
5       - '{project-name}-verify-python-{stream}'
6       - 'distribution-verify-{stream}'
7       - 'distribution-merge-{stream}'
8       - 'distribution-deploy-{stream}'
9       - 'distribution-offline-{stream}'
10
11     project: integration/distribution
12     project-name: distribution
13
14     stream:
15       - nitrogen:
16           branch: 'master'
17           jre: 'openjdk8'
18       - carbon:
19           branch: 'stable/carbon'
20           jre: 'openjdk8'
21       - boron:
22           branch: 'stable/boron'
23           jre: 'openjdk8'
24       - beryllium:
25           branch: 'stable/beryllium'
26           jre: 'openjdk7'
27
28
29 - job-template:
30     name: 'distribution-verify-{stream}'
31
32     project-type: maven
33     node: centos7-java-builder-2c-8g
34     concurrent: true
35     jdk: '{jre}'
36
37     properties:
38       - opendaylight-infra-properties:
39           build-days-to-keep: '{build-days-to-keep}'
40
41     parameters:
42       - opendaylight-infra-parameters:
43           os-cloud: '{os-cloud}'
44           project: '{project}'
45           branch: '{branch}'
46           refspec: 'refs/heads/{branch}'
47           artifacts: '{archive-artifacts} **/dependency_tree.txt **/*.hprof'
48       - integration-patch-refspec:
49           branch: '$GERRIT_REFSPEC'
50
51     scm:
52       - gerrit-trigger-scm:
53           refspec: '$PATCHREFSPEC'
54           choosing-strategy: 'gerrit'
55
56     wrappers:
57       - opendaylight-infra-wrappers:
58           build-timeout: '{build-timeout}'
59
60     triggers:
61       - gerrit-trigger-patch-submitted:
62           server: '{server-name}'
63           project: '{project}'
64           branch: '{branch}'
65           files: '**'
66
67     prebuilders:
68       - integration-get-bundle-url-root
69       - inject:
70           properties-file: 'bundle.txt'
71       - wipe-org-opendaylight-repo
72       - provide-maven-settings:
73           global-settings-file: 'odl-global-settings'
74           settings-file: 'integration-settings'
75
76     maven:
77       maven-name: 'mvn33'
78       root-pom: 'pom.xml'
79       goals: >
80           clean install dependency:tree -DoutputFile=dependency_tree.txt -V -B
81           -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
82           -Djenkins -Dstream={stream}
83       maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
84       settings: 'integration-settings'
85       settings-type: cfp
86       global-settings: 'odl-global-settings'
87       global-settings-type: cfp
88       ignore-upstream-changes: true
89       post-step-run-condition: 'SUCCESS'
90
91     postbuilders:
92       - trigger-builds:
93           - project: 'distribution-deploy-{stream}'
94             block: true
95             predefined-parameters:
96               BUNDLEURL=$BUNDLEURL
97
98     reporters:
99       - findbugs
100
101     publishers:
102       - jacoco-report
103       - opendaylight-infra-shiplogs:
104           maven-version: 'mvn33'
105       - email-notification:
106           email-recipients: '{email-recipients}'
107           email-prefix: '[int/dist]'
108
109
110 - job-template:
111     name: 'distribution-merge-{stream}'
112
113     # Need to keep jobs that deploy to Nexus at end of build as Maven
114     # projects. Maybe reconsider this once upstream moves deploy to a
115     # separate lifecycle:
116     #     https://issues.apache.org/jira/browse/MNG-5666
117
118     project-type: maven
119     node: '{build-node}'
120     jdk: '{jre}'
121
122     properties:
123       - opendaylight-infra-properties:
124           build-days-to-keep: '{build-days-to-keep}'
125
126     parameters:
127       - opendaylight-infra-parameters:
128           os-cloud: '{os-cloud}'
129           project: '{project}'
130           branch: '{branch}'
131           refspec: 'refs/heads/{branch}'
132           artifacts: '{archive-artifacts} **/dependency_tree.txt **/*.hprof **/target/surefire-reports/*-output.txt'
133       - integration-bundleurl:
134           bundleurl: 'last'
135     scm:
136       - gerrit-trigger-scm:
137           refspec: ''
138           choosing-strategy: 'default'
139
140     wrappers:
141       - opendaylight-infra-wrappers:
142           build-timeout: '{build-timeout}'
143
144     triggers:
145       - gerrit-trigger-patch-merged:
146           server-name: '{server-name}'
147           name: 'integration/distribution'
148           branch: '{branch}'
149
150     prebuilders:
151       - wipe-org-opendaylight-repo
152       - jacoco-nojava-workaround
153       - integration-get-bundle-vars
154       - inject:
155           properties-file: 'bundle_vars.txt'
156       - provide-maven-settings:
157           global-settings-file: 'odl-global-settings'
158           settings-file: 'integration-settings'
159       - distribute-build-url:
160           path: 'distribution-karaf/src/main/assembly'
161
162     maven:
163       maven-name: 'mvn33'
164       root-pom: 'pom.xml'
165       goals: >
166           clean install dependency:tree -DoutputFile=dependency_tree.txt -V -B
167           -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
168           -Djenkins -Dmerge -Dstream={stream}
169       maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
170       settings: 'integration-settings'
171       settings-type: cfp
172       global-settings: 'odl-global-settings'
173       global-settings-type: cfp
174
175     postbuilders:
176       - conditional-step:
177           condition-kind: file-exists
178           condition-filename: deploy-site.xml
179           condition-basedir: workspace
180
181           # The strategy here is intentional to run Maven site:deploy twice
182           # once using regular pom.xml to produce a staged-site which is
183           # then used by deploy-site.xml to push to Nexus. This is a
184           # workaround to Maven Site's default linking code which creates
185           # incorrect URLs for sites due to auto-detection assuming your
186           # project is configured in a certain way which ODL is not.
187           steps:
188             - maven-target:
189                 maven-version: 'mvn33'
190                 pom: pom.xml
191                 goals: 'site:deploy -V -B -Dstream={stream}'
192                 java-opts:
193                   - '-Xmx2g'
194                 settings: 'integration-settings'
195                 settings-type: cfp
196                 global-settings: 'odl-global-settings'
197                 global-settings-type: cfp
198             - maven-target:
199                 maven-version: 'mvn33'
200                 pom: deploy-site.xml
201                 goals: 'site:deploy -V -B -Dstream={stream}'
202                 java-opts:
203                   - '-Xmx2g'
204                 settings: 'integration-settings'
205                 settings-type: cfp
206                 global-settings: 'odl-global-settings'
207                 global-settings-type: cfp
208       - integration-compare-distributions
209     # TODO: the output of the above command is not *friendly* for the reader because the most important info
210     # is listed last. This is fine/best for command line output, but for keeping in a file it would be better
211     # to put the summary at the beginning of the file. Some bash magic can be done here to make that happen.
212
213     reporters:
214       - findbugs
215
216     publishers:
217       - maven-deploy:
218           id: ''
219           unique-version: true
220           deploy-unstable: false
221       - jacoco-report
222       - opendaylight-infra-shiplogs:
223           maven-version: 'mvn33'
224       - email-notification:
225           email-recipients: '{email-recipients}'
226           email-prefix: '[int/dist]'
227
228 # Template: distribution-deploy-{stream}
229 # Goal: Verify distribution starts with no issues when all features are loaded
230 # Operation: This job deploys the controller installing odl-integration-all
231
232 - job-template:
233     name: 'distribution-deploy-{stream}'
234
235     project-type: freestyle
236     node: centos7-java-builder-2c-8g
237     concurrent: true
238
239     properties:
240       - opendaylight-infra-properties:
241           build-days-to-keep: '{build-days-to-keep}'
242
243     parameters:
244       - opendaylight-infra-parameters:
245           os-cloud: '{os-cloud}'
246           project: '{project}'
247           branch: '{branch}'
248           refspec: 'refs/heads/{branch}'
249           artifacts: '{archive-artifacts} **/*.hprof'
250       - integration-distribution-branch:
251           branch: '{branch}'
252       - integration-bundleurl:
253           bundleurl: '{bundleurl}'
254       - integration-jdk-version:
255           jdkversion: '{jre}'
256
257     wrappers:
258       - opendaylight-infra-wrappers:
259           build-timeout: '{build-timeout}'
260
261     triggers:
262       - timed: 'H H * * *'
263
264     builders:
265       - integration-get-bundle-vars
266       - inject:
267           properties-file: 'bundle_vars.txt'
268       - integration-deploy-controller-verify
269
270     publishers:
271       - email-notification:
272           email-recipients: '{email-recipients}'
273           email-prefix: '[int/dist]'
274       - integration-csit-archive-build
275       - opendaylight-infra-shiplogs:
276           maven-version: 'mvn33'
277
278 # Template: distribution-offline-{stream}
279 # Goal: Verify distribution can start with no internet connection
280 # Operation: This job deploys the controller removing any external repository definition
281
282 - job-template:
283     name: 'distribution-offline-{stream}'
284
285     project-type: freestyle
286     node: centos7-java-builder-2c-8g
287
288     properties:
289       - opendaylight-infra-properties:
290           build-days-to-keep: '{build-days-to-keep}'
291
292     parameters:
293       - opendaylight-infra-parameters:
294           os-cloud: '{os-cloud}'
295           project: '{project}'
296           branch: '{branch}'
297           refspec: 'refs/heads/{branch}'
298           artifacts: '{archive-artifacts} **/*.hprof'
299       - integration-distribution-branch:
300           branch: '{branch}'
301       - integration-bundleurl:
302           bundleurl: '{bundleurl}'
303       - integration-jdk-version:
304           jdkversion: '{jre}'
305
306     wrappers:
307       - opendaylight-infra-wrappers:
308           build-timeout: '{build-timeout}'
309
310     triggers:
311       - timed: 'H H * * *'
312
313     builders:
314       - integration-get-bundle-vars
315       - inject:
316           properties-file: 'bundle_vars.txt'
317       - integration-deploy-controller-offline
318
319     publishers:
320       - email-notification:
321           email-recipients: '{email-recipients}'
322           email-prefix: '[int/dist]'
323       - integration-csit-archive-build
324       - opendaylight-infra-shiplogs:
325           maven-version: 'mvn33'