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