bee3932227ff6c7b798c6ab6b940a2e8c8aaa430
[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       - 'integration-distribution-high-frequency-test-trigger-{stream}'
16
17     # CSIT Lists in releng-defaults.yaml
18     stream:
19       - nitrogen:
20           branch: 'master'
21           karaf-version: karaf3
22           jre: 'openjdk8'
23           csit-list: '{csit-list-nitrogen}'
24           csit-sanity-list: '{csit-sanity-list-nitrogen}'
25           csit-weekly-list: '{csit-weekly-list-nitrogen}'
26           schedule-weekly: 'H 12 * * 0'
27           csit-high-frequency-list: ''
28           schedule-high-frequency: ''
29
30       - carbon:
31           branch: 'stable/carbon'
32           karaf-version: karaf3
33           jdk: 'openjdk8'
34           jre: 'openjdk8'
35           csit-list: '{csit-list-carbon}'
36           csit-sanity-list: '{csit-sanity-list-carbon}'
37           csit-weekly-list: '{csit-weekly-list-carbon}'
38           schedule-weekly: 'H 12 * * 0'
39           csit-high-frequency-list: '{csit-high-frequency-list-carbon}'
40           schedule-high-frequency: 'H H/4 * * *'
41
42       - boron:
43           branch: 'stable/boron'
44           karaf-version: karaf3
45           jdk: 'openjdk8'
46           jre: 'openjdk8'
47           csit-list: '{csit-list-boron}'
48           csit-sanity-list: '{csit-sanity-list-boron}'
49           csit-weekly-list: '{csit-weekly-list-boron}'
50           schedule-weekly: 'H 12 * * 0'
51           csit-high-frequency-list: ''
52           schedule-high-frequency: ''
53
54       - beryllium:
55           branch: 'stable/beryllium'
56           karaf-version: karaf3
57           jdk: 'openjdk7'
58           jre: 'openjdk7'
59           csit-list: '{csit-list-beryllium}'
60           csit-sanity-list: ''
61           csit-weekly-list: ''
62           schedule-weekly: 'H 12 * * 0'
63           csit-high-frequency-list: ''
64           schedule-high-frequency: ''
65
66     # tools system image
67     tools_system_image: Ubuntu 14.04 - mininet-ovs-25 - 20170210-0300
68
69 # Template: integration-csit-verify-1node-library
70 # Goal: Verify changes in csit folder not covered by projects suite verify jobs (e.g. libraries or variables)
71 # Operation: This job template performs a base openflow test when there is a change in the libraries folder
72
73 - job-template:
74     name: 'integration-csit-verify-1node-library'
75
76     project-type: freestyle
77     node: centos7-robot-2c-2g
78
79     # {stream} is already defined as a composite object, it cannot be overriden.
80     dist-stream: boron
81     # This is not a template, so define branch, scope and jre for distribution to test with.
82     branch: stable/boron
83     scope: only
84     jre: openjdk8
85
86     properties:
87       - opendaylight-infra-properties:
88           build-days-to-keep: '{build-days-to-keep}'
89
90     parameters:
91       - opendaylight-infra-parameters:
92           os-cloud: '{os-cloud}'
93           project: '{project}'
94           branch: '{test-branch}'
95           refspec: 'refs/heads/{test-branch}'
96           artifacts: '{archive-artifacts}'
97       - integration-distribution-branch:
98           branch: '{verify-branch}'
99       - integration-distribution-stream:
100           stream: '{verify-stream}'
101       - integration-bundle-url:
102           bundle-url: '{bundle-url}'
103       - integration-controller-scope:
104           controller-scope: '{scope}'
105       - integration-controller-features:
106           controller-features: >
107               odl-clustering-test-app,
108               odl-openflowplugin-flow-services-ui,
109               odl-openflowplugin-app-table-miss-enforcer,
110               odl-bgpcep-pcep,
111               odl-bgpcep-bgp,
112               odl-netconf-connector-all
113       # when upgrading to carbon you should replace odl-netconf-connector-all with odl-netconf-topology
114       # and change USE_NETCONF_CONNECTOR to False in test-options
115       - integration-test-options:
116           test-options: '-v TIMEOUT_BUG_4220:10s -v USE_NETCONF_CONNECTOR:True'
117       - integration-stream-test-plan:
118           stream-test-plan: 'test-libraries-{verify-stream}.txt'
119       - integration-test-plan:
120           test-plan: 'test-libraries.txt'
121       - integration-patch-refspec:
122           branch: '$GERRIT_REFSPEC'
123       - integration-jdk-version:
124           jdkversion: '{jre}'
125       - distribution-karaf-version:
126           karaf-version: '{verify-karaf-version}'
127
128     scm:
129       - integration-gerrit-scm:
130           basedir: 'test'
131           refspec: '$PATCHREFSPEC'
132           branch: '{test-branch}'
133
134     wrappers:
135       - opendaylight-infra-wrappers:
136           build-timeout: '{build-timeout}'
137
138     triggers:
139       - integration-trigger-patch-submitted:
140           server: '{server-name}'
141           project: '{project}'
142           branch: '{test-branch}'
143           files: 'csit/libraries/*'
144
145     builders:
146       - integration-infra-stack:
147           stack-template: '{stack-template}'
148           vm_0_count: '1'
149           vm_0_flavor: '{odl_system_flavor}'
150           vm_0_image: '{odl_system_image}'
151           vm_1_count: '{tools_system_count}'
152           vm_1_flavor: '{tools_system_flavor}'
153           vm_1_image: '{tools_system_image}'
154       - integration-install-robotframework
155       - inject:
156           properties-file: 'env.properties'
157       - integration-get-slave-addresses
158       - inject:
159           properties-file: 'slave_addresses.txt'
160       - integration-detect-variables
161       - integration-deploy-controller-run-test
162       - integration-cleanup-tmp
163
164     publishers:
165       - integration-robot:
166           unstable-if: 0.0
167           pass-if: 100.0
168       - email-notification:
169           email-recipients: '{email-recipients}'
170           email-prefix: '[integration]'
171       - integration-csit-archive-build
172       - opendaylight-infra-shiplogs:
173           maven-version: 'mvn33'
174
175 # Template: integration-distribution-test-{stream}
176 # Goal: Verify a distribution through all system test available
177 # Operation: This template takes a distribution and passes all available system test
178
179 - job-template:
180     name: 'integration-distribution-test-{stream}'
181
182     project-type: freestyle
183     node: centos7-robot-2c-2g
184
185     properties:
186       - opendaylight-infra-properties:
187           build-days-to-keep: '{build-days-to-keep}'
188
189     parameters:
190       - integration-bundle-url:
191           bundle-url: '{bundle-url}'
192       - distribution-karaf-version:
193           karaf-version: '{karaf-version}'
194
195     builders:
196       - trigger-builds:
197           - project: '{csit-list}'
198             block: true
199             predefined-parameters:
200               BUNDLE_URL=$BUNDLE_URL
201
202     publishers:
203       - email-notification:
204           email-recipients: '{email-recipients}'
205           email-prefix: '[integration]'
206
207 # Template: integration-sanity-test-{stream}
208 # Goal: Verify a distribution through sanity test
209 # Operation: This template takes a distribution and passes sanity test
210
211 - job-template:
212     name: 'integration-sanity-test-{stream}'
213
214     project-type: freestyle
215     node: centos7-robot-2c-2g
216
217     properties:
218       - opendaylight-infra-properties:
219           build-days-to-keep: '{build-days-to-keep}'
220
221     parameters:
222       - integration-bundle-url:
223           bundle-url: '{bundle-url}'
224       - distribution-karaf-version:
225           karaf-version: '{karaf-version}'
226
227     builders:
228       - trigger-builds:
229           - project: '{csit-sanity-list}'
230             block: true
231             predefined-parameters: |
232               BUNDLE_URL=$BUNDLE_URL
233               KARAF_VERSION=$KARAF_VERSION
234
235     publishers:
236       - email-notification:
237           email-recipients: '{email-recipients}'
238           email-prefix: '[integration]'
239
240 # Template: integration-patch-test-{stream}
241 # Goal: Build a patch and run all available system test on a distribution containing the change
242 # Operation: This job template builds a patch, creates a distribution containing the patch, and
243 # triggers the distribution test when test-integration is used in gerrit comments
244
245 - job-template:
246     name: 'integration-patch-test-{stream}'
247
248     project-type: freestyle
249     node: centos7-java-builder-2c-8g
250
251     properties:
252       - opendaylight-infra-properties:
253           build-days-to-keep: '{build-days-to-keep}'
254
255     parameters:
256       - opendaylight-infra-parameters:
257           os-cloud: '{os-cloud}'
258           project: '$GERRIT_PROJECT'
259           branch: '{branch}'
260           refspec: '$GERRIT_REFSPEC'
261           artifacts: '{archive-artifacts} **/dependency_tree.txt'
262       - integration-distribution-branch:
263           branch: '{branch}'
264       - distribution-karaf-version:
265           karaf-version: '{karaf-version}'
266       - integration-distribution-git-url:
267           git-url: '{git-url}'
268       - maven-exec:
269           maven-version: mvn33
270
271     scm:
272       - integration-gerrit-scm:
273           basedir: '$GERRIT_PROJECT'
274           refspec: '$GERRIT_REFSPEC'
275           branch: '{branch}'
276       - integration-distribution-scm:
277           branch: '{branch}'
278
279     wrappers:
280       - opendaylight-infra-wrappers:
281           build-timeout: '720'
282
283     triggers:
284       - gerrit:
285           server-name: '{server-name}'
286           trigger-on:
287             - comment-added-contains-event:
288                 comment-contains-value: 'test-integration'
289           projects:
290             - project-compare-type: 'ANT'
291               project-pattern: '**'
292               branches:
293                 - branch-compare-type: 'ANT'
294                   branch-pattern: '**/{branch}'
295           skip-vote:
296             successful: true
297             failed: true
298             unstable: true
299             notbuilt: true
300
301     builders:
302       - integration-rebase-gerrit-patch
303       - wipe-org-opendaylight-repo
304       - provide-maven-settings:
305           global-settings-file: 'odl-global-settings'
306           settings-file: 'integration-settings'
307       - maven-target:
308           maven-version: 'mvn33'
309           pom: '$GERRIT_PROJECT/pom.xml'
310           goals: |
311               clean install dependency:tree -DoutputFile=dependency_tree.txt
312               -Pq
313               -Dstream={stream}
314               {opendaylight-infra-mvn-opts}
315           java-opts:
316             - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
317           settings: integration-settings
318           settings-type: cfp
319           global-settings: odl-global-settings
320           global-settings-type: cfp
321       - maven-target:
322           maven-version: mvn33
323           pom: distribution/pom.xml
324           goals: |
325               clean install dependency:tree -DoutputFile=dependency_tree.txt
326               {opendaylight-infra-mvn-opts}
327           java-opts:
328             - '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
329           settings: integration-settings
330           settings-type: cfp
331           global-settings: odl-global-settings
332           global-settings-type: cfp
333       - integration-upload-distribution:
334           dist-pom: distribution/pom.xml
335       - trigger-builds:
336           - project: '{csit-list}'
337             block: true
338             predefined-parameters: |
339               BUNDLE_URL=$BUNDLE_URL
340               KARAF_VERSION=$KARAF_VERSION
341
342     publishers:
343       - opendaylight-infra-shiplogs:
344           maven-version: 'mvn33'
345       - email-notification:
346           email-recipients: '{email-recipients}'
347           email-prefix: '[$GERRIT_PROJECT]'
348
349
350 - job-template:
351     name: 'integration-multipatch-test-{stream}'
352     # Goal: Build one or more patches and run all available system test on a distribution containing the change.
353     # Operation: This job template checks out and builds each patch provided in job parameters, creates a distribution
354     # containing these patches, and triggers the distribution test job which includes most (if not all) available
355     # CSIT jobs
356     # TODO: Move the following to appropriate readthedocs document.
357     # Recommended Sandbox usage:
358     # 0. Create this job and a CSIT job you want to run on the new .zip in Sandbox (disable timed triggers).
359     # 1. Copy the csit job name to clipboard.
360     # 2. Navigate to Sandbox page of this job.
361     # 3. Click "Configure".
362     # 4. Locate "Trigger/call builds on other projects" (under "Post Steps" tab).
363     # 5. Delete the long value of "Projects to build" field and paste the job name from clipboard (ctrl+a, ctrl+v).
364     # 6. Click "Save" button.
365     # 7. Click "Build with Parameters".
366     # yamllint disable-line rule:line-length
367     # 8. Start the job with your parameters, see https://wiki.opendaylight.org/view/Integration/Test/Running_System_Tests#Running_System_Tests_Using_Custom_Distribution_Built_From_Multiple_Patches
368     # 9. The multipatch job waits for the csit job to finish, so abort csit if you see something went wrong.
369     # 10. Navigate to Sandbox page of the csit job, click the run triggered from multipatch.
370     # 11. Click Parameters and copy the long value of BUNDLE_URL field to clipboard.
371     # 12. Run the same csit job woth different patchset or test options, or other csit jobs, with this BUNDLE_URL value
372     #     so you do not have to wait for multipatch build. Repeat step 12.
373     # 13. Currently, the .zip lasts 24 hours (?) so you may need to jump to step 2 (or 0) after some time.
374
375     project-type: freestyle
376     node: centos7-java-builder-8c-8g
377     jdk: '{jdk}'
378
379     properties:
380       - opendaylight-infra-properties:
381           build-days-to-keep: '{build-days-to-keep}'
382
383     parameters:
384       - patches-to-build-parameter:
385           patches_to_build: '$PATCHES_TO_BUILD'
386       - run-test-parameter:
387           run-test: 'false'
388       - integration-distribution-branch:
389           branch: '{branch}'
390       - distribution-karaf-version:
391           karaf-version: '{karaf-version}'
392       - opendaylight-infra-parameters:
393           os-cloud: '{os-cloud}'
394           project: 'integration/distribution'
395           branch: '{branch}'
396           refspec: 'refs/heads/{branch}'
397           artifacts: '{archive-artifacts} **/dependency_tree.txt'
398       - maven-exec:
399           maven-version: mvn33
400
401     wrappers:
402       - opendaylight-infra-wrappers:
403           build-timeout: '1200'
404
405     builders:
406       - wipe-org-opendaylight-repo
407       - integration-multipatch-builder
408       - provide-maven-settings:
409           global-settings-file: 'odl-global-settings'
410           settings-file: 'yangtools-settings'
411       - maven-target:
412           maven-version: mvn33
413           pom: patch_tester/pom.xml
414           # TODO: Make Maven options configurable. Currently tests are not skipped, everything else is.
415           goals: |
416               clean install dependency:tree -DoutputFile=dependency_tree.txt
417               -Pq
418               -Dstream={stream}
419               {opendaylight-infra-mvn-opts}
420           java-opts:
421             - '-Xmx7168m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
422           settings: integration-settings
423           settings-type: cfp
424           global-settings: odl-global-settings
425           global-settings-type: cfp
426       - integration-upload-distribution:
427           dist-pom: patch_tester/distribution/pom.xml
428       - conditional-step:
429           condition-kind: boolean-expression
430           condition-expression: $RUNTEST
431           steps:
432             - trigger-builds:
433                 - project: '{csit-list}'
434                   block: true
435                   predefined-parameters: |
436                     BUNDLE_URL=$BUNDLE_URL
437                     KARAF_VERSION=$KARAF_VERSION
438
439     publishers:
440       - opendaylight-infra-shiplogs:
441           maven-version: 'mvn33'
442       - email-notification:
443           email-recipients: '{email-recipients}'
444           email-prefix: '[int/dist]'
445
446 - job-template:
447     name: 'integration-distribution-weekly-test-trigger-{stream}'
448
449     project-type: freestyle
450     node: centos7-robot-2c-2g
451
452     properties:
453       - opendaylight-infra-properties:
454           build-days-to-keep: '{build-days-to-keep}'
455
456     parameters:
457       - integration-bundle-url:
458           bundle-url: '{bundle-url}'
459       - distribution-karaf-version:
460           karaf-version: '{karaf-version}'
461
462     triggers:
463       - timed: '{schedule-weekly}'
464
465     builders:
466       - trigger-builds:
467           - project: '{csit-weekly-list}'
468             block: true
469             predefined-parameters: |
470               BUNDLE_URL=$BUNDLE_URL
471               KARAF_VERSION=$KARAF_VERSION
472
473     publishers:
474       - email-notification:
475           email-recipients: '{email-recipients}'
476           email-prefix: '[integration]'
477
478 - job-template:
479     name: 'integration-distribution-high-frequency-test-trigger-{stream}'
480
481     project-type: freestyle
482     node: centos7-robot-2c-2g
483
484     properties:
485       - opendaylight-infra-properties:
486           build-days-to-keep: '{build-days-to-keep}'
487
488     parameters:
489       - integration-bundle-url:
490           bundle-url: '{bundle-url}'
491       - distribution-karaf-version:
492           karaf-version: '{karaf-version}'
493
494     triggers:
495       - timed: '{schedule-high-frequency}'
496
497     builders:
498       - trigger-builds:
499           - project: '{csit-high-frequency-list}'
500             block: true
501             predefined-parameters: |
502               BUNDLE_URL=$BUNDLE_URL
503               KARAF_VERSION=$KARAF_VERSION
504
505     publishers:
506       - email-notification:
507           email-recipients: '{email-recipients}'
508           email-prefix: '[integration]'