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