Handle bundle-vars directly in dist-compare script
[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     scm:
134       - gerrit-trigger-scm:
135           refspec: ''
136           choosing-strategy: 'default'
137
138     wrappers:
139       - opendaylight-infra-wrappers:
140           build-timeout: '{build-timeout}'
141
142     triggers:
143       - gerrit-trigger-patch-merged:
144           server-name: '{server-name}'
145           name: 'integration/distribution'
146           branch: '{branch}'
147
148     prebuilders:
149       - wipe-org-opendaylight-repo
150       - jacoco-nojava-workaround
151       - provide-maven-settings:
152           global-settings-file: 'odl-global-settings'
153           settings-file: 'integration-settings'
154       - distribute-build-url:
155           path: 'distribution-karaf/src/main/assembly'
156
157     maven:
158       maven-name: 'mvn33'
159       root-pom: 'pom.xml'
160       goals: >
161           clean install dependency:tree -DoutputFile=dependency_tree.txt -V -B
162           -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
163           -Djenkins -Dmerge -Dstream={stream}
164       maven-opts: '-Xmx1024m -XX:MaxPermSize=256m'
165       settings: 'integration-settings'
166       settings-type: cfp
167       global-settings: 'odl-global-settings'
168       global-settings-type: cfp
169
170     postbuilders:
171       - conditional-step:
172           condition-kind: file-exists
173           condition-filename: deploy-site.xml
174           condition-basedir: workspace
175
176           # The strategy here is intentional to run Maven site:deploy twice
177           # once using regular pom.xml to produce a staged-site which is
178           # then used by deploy-site.xml to push to Nexus. This is a
179           # workaround to Maven Site's default linking code which creates
180           # incorrect URLs for sites due to auto-detection assuming your
181           # project is configured in a certain way which ODL is not.
182           steps:
183             - maven-target:
184                 maven-version: 'mvn33'
185                 pom: pom.xml
186                 goals: 'site:deploy -V -B -Dstream={stream}'
187                 java-opts:
188                   - '-Xmx2g'
189                 settings: 'integration-settings'
190                 settings-type: cfp
191                 global-settings: 'odl-global-settings'
192                 global-settings-type: cfp
193             - maven-target:
194                 maven-version: 'mvn33'
195                 pom: deploy-site.xml
196                 goals: 'site:deploy -V -B -Dstream={stream}'
197                 java-opts:
198                   - '-Xmx2g'
199                 settings: 'integration-settings'
200                 settings-type: cfp
201                 global-settings: 'odl-global-settings'
202                 global-settings-type: cfp
203       - integration-compare-distributions
204     # TODO: the output of the above command is not *friendly* for the reader because the most important info
205     # is listed last. This is fine/best for command line output, but for keeping in a file it would be better
206     # to put the summary at the beginning of the file. Some bash magic can be done here to make that happen.
207
208     reporters:
209       - findbugs
210
211     publishers:
212       - maven-deploy:
213           id: ''
214           unique-version: true
215           deploy-unstable: false
216       - jacoco-report
217       - opendaylight-infra-shiplogs:
218           maven-version: 'mvn33'
219       - email-notification:
220           email-recipients: '{email-recipients}'
221           email-prefix: '[int/dist]'
222
223 # Template: distribution-deploy-{stream}
224 # Goal: Verify distribution starts with no issues when all features are loaded
225 # Operation: This job deploys the controller installing odl-integration-all
226
227 - job-template:
228     name: 'distribution-deploy-{stream}'
229
230     project-type: freestyle
231     node: centos7-java-builder-2c-8g
232     concurrent: true
233
234     properties:
235       - opendaylight-infra-properties:
236           build-days-to-keep: '{build-days-to-keep}'
237
238     parameters:
239       - opendaylight-infra-parameters:
240           os-cloud: '{os-cloud}'
241           project: '{project}'
242           branch: '{branch}'
243           refspec: 'refs/heads/{branch}'
244           artifacts: '{archive-artifacts} **/*.hprof'
245       - integration-distribution-branch:
246           branch: '{branch}'
247       - integration-bundleurl:
248           bundleurl: '{bundleurl}'
249       - integration-jdk-version:
250           jdkversion: '{jre}'
251
252     wrappers:
253       - opendaylight-infra-wrappers:
254           build-timeout: '{build-timeout}'
255
256     triggers:
257       - timed: 'H H * * *'
258
259     builders:
260       - integration-get-bundle-vars
261       - inject:
262           properties-file: 'bundle_vars.txt'
263       - integration-deploy-controller-verify
264
265     publishers:
266       - email-notification:
267           email-recipients: '{email-recipients}'
268           email-prefix: '[int/dist]'
269       - integration-csit-archive-build
270       - opendaylight-infra-shiplogs:
271           maven-version: 'mvn33'
272
273 # Template: distribution-offline-{stream}
274 # Goal: Verify distribution can start with no internet connection
275 # Operation: This job deploys the controller removing any external repository definition
276
277 - job-template:
278     name: 'distribution-offline-{stream}'
279
280     project-type: freestyle
281     node: centos7-java-builder-2c-8g
282
283     properties:
284       - opendaylight-infra-properties:
285           build-days-to-keep: '{build-days-to-keep}'
286
287     parameters:
288       - opendaylight-infra-parameters:
289           os-cloud: '{os-cloud}'
290           project: '{project}'
291           branch: '{branch}'
292           refspec: 'refs/heads/{branch}'
293           artifacts: '{archive-artifacts} **/*.hprof'
294       - integration-distribution-branch:
295           branch: '{branch}'
296       - integration-bundleurl:
297           bundleurl: '{bundleurl}'
298       - integration-jdk-version:
299           jdkversion: '{jre}'
300
301     wrappers:
302       - opendaylight-infra-wrappers:
303           build-timeout: '{build-timeout}'
304
305     triggers:
306       - timed: 'H H * * *'
307
308     builders:
309       - integration-get-bundle-vars
310       - inject:
311           properties-file: 'bundle_vars.txt'
312       - integration-deploy-controller-offline
313
314     publishers:
315       - email-notification:
316           email-recipients: '{email-recipients}'
317           email-prefix: '[int/dist]'
318       - integration-csit-archive-build
319       - opendaylight-infra-shiplogs:
320           maven-version: 'mvn33'