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