Merge "Distribution test optimization"
[releng/builder.git] / jjb / integration / integration-test-jobs.yaml
1 ---
2 - project:
3     name: integration-test
4     project: integration/test
5     project-name: integration-test
6     test-branch: master
7     jobs:
8       - '{project-name}-verify-tox-master'
9       - 'integration-csit-verify-1node-library'
10       - 'integration-distribution-test-{stream}'
11       - 'integration-patch-test-{stream}'
12       - 'integration-multipatch-test-{stream}'
13       - 'integration-distribution-weekly-test-trigger-{stream}'
14
15     # CSIT Lists in releng-defaults.yaml
16     stream:
17       - carbon:
18           branch: 'master'
19           jdk: 'openjdk8'
20           jre: 'openjdk8'
21           csit-list: '{csit-list-carbon}'
22           csit-weekly-list: '{csit-weekly-list-carbon}'
23           schedule-weekly: 'H 12 * * 0'
24
25       - boron:
26           branch: 'stable/boron'
27           jdk: 'openjdk8'
28           jre: 'openjdk8'
29           csit-list: '{csit-list-boron}'
30           csit-weekly-list: ''
31           schedule-weekly: 'H 12 * * 0'
32
33       - beryllium:
34           branch: 'stable/beryllium'
35           jdk: 'openjdk7'
36           jre: 'openjdk7'
37           csit-list: '{csit-list-beryllium}'
38           csit-weekly-list: ''
39           schedule-weekly: 'H 12 * * 0'
40
41     # tools system image
42     tools_system_image: Ubuntu 14.04 - mininet-ovs-25 - 20170210-0300
43
44 # Template: integration-csit-verify-1node-library
45 # Goal: Verify changes in csit folder not covered by projects suite verify jobs (e.g. libraries or variables)
46 # Operation: This job template performs a base openflow test when there is a change in the libraries folder
47
48 - job-template:
49     name: 'integration-csit-verify-1node-library'
50
51     project-type: freestyle
52     node: centos7-robot-2c-2g
53
54     # {stream} is already defined as a composite object, it cannot be overriden.
55     dist-stream: boron
56     # This is not a template, so define branch, scope and jre for distribution to test with.
57     branch: stable/boron
58     scope: only
59     jre: openjdk8
60
61     properties:
62       - opendaylight-infra-properties:
63           build-days-to-keep: '{build-days-to-keep}'
64
65     parameters:
66       - opendaylight-infra-parameters:
67           os-cloud: '{os-cloud}'
68           project: '{project}'
69           branch: '{test-branch}'
70           refspec: 'refs/heads/{test-branch}'
71           artifacts: '{archive-artifacts}'
72       - integration-distribution-branch:
73           branch: '{branch}'
74       - integration-distribution-stream:
75           stream: '{dist-stream}'
76       - integration-bundleurl:
77           bundleurl: '{bundleurl}'
78       - integration-controller-scope:
79           controller-scope: '{scope}'
80       - integration-controller-features:
81           controller-features: >
82               odl-clustering-test-app,
83               odl-openflowplugin-flow-services-ui,
84               odl-openflowplugin-app-table-miss-enforcer,
85               odl-bgpcep-pcep,
86               odl-bgpcep-bgp,
87               odl-netconf-connector-all
88       # when upgrading to carbon you should replace odl-netconf-connector-all with odl-netconf-topology
89       # and change USE_NETCONF_CONNECTOR to False in test-options
90       - integration-test-options:
91           test-options: '-v TIMEOUT_BUG_4220:10s -v USE_NETCONF_CONNECTOR:True'
92       - integration-stream-test-plan:
93           stream-test-plan: 'test-libraries-{dist-stream}.txt'
94       - integration-test-plan:
95           test-plan: 'test-libraries.txt'
96       - integration-patch-refspec:
97           branch: '$GERRIT_REFSPEC'
98       - integration-jdk-version:
99           jdkversion: '{jre}'
100
101     scm:
102       - integration-gerrit-scm:
103           basedir: 'test'
104           refspec: '$PATCHREFSPEC'
105           branch: '{test-branch}'
106
107     wrappers:
108       - opendaylight-infra-wrappers:
109           build-timeout: '{build-timeout}'
110
111     triggers:
112       - integration-trigger-patch-submitted:
113           server: '{server-name}'
114           project: '{project}'
115           branch: '{test-branch}'
116           files: 'csit/libraries/*'
117
118     builders:
119       - integration-infra-stack:
120           stack-template: '{stack-template}'
121           vm_0_count: '1'
122           vm_0_flavor: '{odl_system_flavor}'
123           vm_0_image: '{odl_system_image}'
124           vm_1_count: '{tools_system_count}'
125           vm_1_flavor: '{tools_system_flavor}'
126           vm_1_image: '{tools_system_image}'
127       - integration-install-robotframework
128       - inject:
129           properties-file: 'env.properties'
130       - integration-get-slave-addresses
131       - inject:
132           properties-file: 'slave_addresses.txt'
133       - integration-get-bundle-vars
134       - inject:
135           properties-file: 'bundle_vars.txt'
136       - integration-deploy-controller-run-test
137       - integration-cleanup-tmp
138
139     publishers:
140       - integration-robot:
141           unstable-if: 0.0
142           pass-if: 100.0
143       - email-notification:
144           email-recipients: '{email-recipients}'
145           email-prefix: '[integration]'
146       - integration-csit-archive-build
147       - opendaylight-infra-shiplogs:
148           maven-version: 'mvn33'
149
150 # Template: integration-distribution-test-{stream}
151 # Goal: Verify a distribution through all system test available
152 # Operation: This daily job template takes a distribution and passes all available system test
153
154 - job-template:
155     name: 'integration-distribution-test-{stream}'
156
157     project-type: freestyle
158     node: centos7-robot-2c-2g
159
160     properties:
161       - opendaylight-infra-properties:
162           build-days-to-keep: '{build-days-to-keep}'
163
164     parameters:
165       - integration-bundleurl:
166           bundleurl: '{bundleurl}'
167       - integration-jdk-version:
168           jdkversion: '{jre}'
169
170     builders:
171       - trigger-builds:
172           - project: '{csit-list}'
173             block: true
174             predefined-parameters:
175               BUNDLEURL=$BUNDLEURL
176
177     publishers:
178       - email-notification:
179           email-recipients: '{email-recipients}'
180           email-prefix: '[integration]'
181
182 # Template: integration-patch-test-{stream}
183 # Goal: Build a patch and run all available system test on a distribution containing the change
184 # Operation: This job template builds a patch, creates a distribution containing the patch, and
185 # triggers the distribution test when test-integration is used in gerrit comments
186
187 - job-template:
188     name: 'integration-patch-test-{stream}'
189
190     project-type: maven
191     node: centos7-java-builder-2c-8g
192     jdk: '{jdk}'
193
194     properties:
195       - opendaylight-infra-properties:
196           build-days-to-keep: '{build-days-to-keep}'
197
198     parameters:
199       - opendaylight-infra-parameters:
200           os-cloud: '{os-cloud}'
201           project: '$GERRIT_PROJECT'
202           branch: '{branch}'
203           refspec: '$GERRIT_REFSPEC'
204           artifacts: '{archive-artifacts} **/dependency_tree.txt'
205       - integration-distribution-branch:
206           branch: '{branch}'
207       - integration-distribution-git-url:
208           git-url: '{git-url}'
209
210     scm:
211       - integration-gerrit-scm:
212           basedir: '$GERRIT_PROJECT'
213           refspec: '$GERRIT_REFSPEC'
214           branch: '{branch}'
215       - integration-distribution-scm:
216           branch: '{branch}'
217
218     wrappers:
219       - opendaylight-infra-wrappers:
220           build-timeout: '720'
221
222     triggers:
223       - gerrit:
224           server-name: '{server-name}'
225           trigger-on:
226             - comment-added-contains-event:
227                 comment-contains-value: 'test-integration'
228           projects:
229             - project-compare-type: 'ANT'
230               project-pattern: '**'
231               branches:
232                 - branch-compare-type: 'ANT'
233                   branch-pattern: '**/{branch}'
234           skip-vote:
235             successful: true
236             failed: true
237             unstable: true
238             notbuilt: true
239
240     prebuilders:
241       - integration-rebase-gerrit-patch
242       - integration-get-bundle-url
243       - inject:
244           properties-file: 'bundle.txt'
245       - wipe-org-opendaylight-repo
246       - provide-maven-settings:
247           global-settings-file: 'odl-global-settings'
248           settings-file: 'integration-settings'
249       - maven-target:
250           maven-version: 'mvn33'
251           pom: '$GERRIT_PROJECT/pom.xml'
252           goals: >
253               clean install dependency:tree -DoutputFile=dependency_tree.txt
254               -V -B -Pq -Djenkins
255               -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
256               -Dstream={stream}
257           java-opts:
258             - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
259           settings: 'integration-settings'
260           settings-type: cfp
261           global-settings: 'odl-global-settings'
262           global-settings-type: cfp
263
264     maven:
265       maven-name: 'mvn33'
266       root-pom: 'distribution/pom.xml'
267       goals: >
268           clean install dependency:tree -DoutputFile=dependency_tree.txt
269           -V -B -Djenkins
270           -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
271       maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
272       settings: 'integration-settings'
273       settings-type: cfp
274       global-settings: 'odl-global-settings'
275       global-settings-type: cfp
276       ignore-upstream-changes: true
277       post-step-run-condition: 'SUCCESS'
278
279     postbuilders:
280       - trigger-builds:
281           - project: '{csit-list}'
282             block: true
283             predefined-parameters:
284               BUNDLEURL=$BUNDLEURL
285
286     publishers:
287       - opendaylight-infra-shiplogs:
288           maven-version: 'mvn33'
289       - email-notification:
290           email-recipients: '{email-recipients}'
291           email-prefix: '[$GERRIT_PROJECT]'
292
293 # Template: integration-multipatch-test-{stream}
294 # Goal: Build one or more patches and run all available system test on a distribution containing the change
295 # Operation: This job template checks out and builds each patch provided in job parameters, creates a distribution
296 # containing these patches, and triggers the distribution test job which includes most (if not all) available
297 # CSIT jobs
298
299 - job-template:
300     name: 'integration-multipatch-test-{stream}'
301
302     project-type: maven
303     node: centos7-java-builder-8c-8g
304     jdk: '{jdk}'
305
306     properties:
307       - opendaylight-infra-properties:
308           build-days-to-keep: '{build-days-to-keep}'
309
310     parameters:
311       - patches-to-build-parameter:
312           patches_to_build: '$PATCHES_TO_BUILD'
313       - integration-distribution-branch:
314           branch: '{branch}'
315       - opendaylight-infra-parameters:
316           os-cloud: '{os-cloud}'
317           project: 'integration/distribution'
318           branch: '{branch}'
319           refspec: 'refs/heads/{branch}'
320           artifacts: '{archive-artifacts} **/dependency_tree.txt'
321
322     prebuilders:
323       - wipe-org-opendaylight-repo
324       - integration-multipatch-builder
325       - inject:
326           properties-file: 'bundle.txt'
327       - provide-maven-settings:
328           global-settings-file: 'odl-global-settings'
329           settings-file: 'yangtools-settings'
330
331     wrappers:
332       - opendaylight-infra-wrappers:
333           build-timeout: '1200'
334
335     maven:
336       maven-name: 'mvn33'
337       root-pom: 'patch_tester/pom.xml'
338       # TODO: Make Maven options configurable. Currently tests are not skipped, everything else is.
339       goals: >
340           clean install dependency:tree -DoutputFile=dependency_tree.txt
341           -f patch_tester/pom.xml -V -B -Pq -Djenkins
342           -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
343           -Dstream={stream}
344       maven-opts: '-Xmx7168m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
345       settings: 'yangtools-settings'
346       settings-type: cfp
347       global-settings: 'odl-global-settings'
348       global-settings-type: cfp
349       post-step-run-condition: 'SUCCESS'
350
351     postbuilders:
352       - trigger-builds:
353           - project: '{csit-list}'
354             block: true
355             predefined-parameters:
356               BUNDLEURL=$BUNDLEURL
357
358     publishers:
359       - opendaylight-infra-shiplogs:
360           maven-version: 'mvn33'
361       - email-notification:
362           email-recipients: '{email-recipients}'
363           email-prefix: '[int/dist]'
364
365 - job-template:
366     name: 'integration-distribution-weekly-test-trigger-{stream}'
367
368     project-type: freestyle
369     node: centos7-robot-2c-2g
370
371     properties:
372       - opendaylight-infra-properties:
373           build-days-to-keep: '{build-days-to-keep}'
374
375     parameters:
376       - integration-bundleurl:
377           bundleurl: '{bundleurl}'
378       - integration-jdk-version:
379           jdkversion: '{jre}'
380
381     triggers:
382       - timed: '{schedule-weekly}'
383
384     builders:
385       - trigger-builds:
386           - project: '{csit-weekly-list}'
387             block: true
388             predefined-parameters:
389               BUNDLEURL=$BUNDLEURL
390
391     publishers:
392       - email-notification:
393           email-recipients: '{email-recipients}'
394           email-prefix: '[integration]'