Merge "Revert "Make packer jobs build sequentially""
[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       - lf-infra-publish
161
162 # Template: integration-distribution-test-{stream}
163 # Goal: Verify a distribution through all system test available
164 # Operation: This template takes a distribution and passes all available system test
165
166 - job-template:
167     name: 'integration-distribution-test-{stream}'
168
169     project-type: freestyle
170     node: centos7-robot-2c-2g
171
172     properties:
173       - opendaylight-infra-properties:
174           build-days-to-keep: '{build-days-to-keep}'
175
176     parameters:
177       - integration-bundle-url:
178           bundle-url: '{bundle-url}'
179       - distribution-karaf-version:
180           karaf-version: '{karaf-version}'
181
182     builders:
183       - trigger-builds:
184           - project: '{csit-list}'
185             block: true
186             predefined-parameters: |
187               BUNDLE_URL=$BUNDLE_URL
188               KARAF_VERSION=$KARAF_VERSION
189
190     publishers:
191       - email-notification:
192           email-recipients: '{email-recipients}'
193           email-prefix: '[integration]'
194
195 # Template: integration-sanity-test-{stream}
196 # Goal: Verify a distribution through sanity test
197 # Operation: This template takes a distribution and passes sanity test
198
199 - job-template:
200     name: 'integration-sanity-test-{stream}'
201
202     project-type: freestyle
203     node: centos7-robot-2c-2g
204
205     properties:
206       - opendaylight-infra-properties:
207           build-days-to-keep: '{build-days-to-keep}'
208
209     parameters:
210       - integration-bundle-url:
211           bundle-url: '{bundle-url}'
212       - distribution-karaf-version:
213           karaf-version: '{karaf-version}'
214
215     builders:
216       - trigger-builds:
217           - project: '{csit-sanity-list}'
218             block: true
219             predefined-parameters: |
220               BUNDLE_URL=$BUNDLE_URL
221               KARAF_VERSION=$KARAF_VERSION
222
223     publishers:
224       - email-notification:
225           email-recipients: '{email-recipients}'
226           email-prefix: '[integration]'
227
228 # Template: integration-patch-test-{stream}
229 # Goal: Build a patch and run all available system test on a distribution containing the change
230 # Operation: This job template builds a patch, creates a distribution containing the patch, and
231 # triggers the distribution test when test-integration is used in gerrit comments
232
233 - job-template:
234     name: 'integration-patch-test-{stream}'
235
236     project-type: freestyle
237     node: centos7-java-builder-2c-8g
238
239     properties:
240       - opendaylight-infra-properties:
241           build-days-to-keep: '{build-days-to-keep}'
242
243     parameters:
244       - opendaylight-infra-parameters:
245           os-cloud: '{os-cloud}'
246           project: '$GERRIT_PROJECT'
247           branch: '{branch}'
248           refspec: '$GERRIT_REFSPEC'
249           artifacts: '{archive-artifacts} **/dependency_tree.txt'
250       - integration-distribution-branch:
251           branch: '{branch}'
252       - distribution-karaf-version:
253           karaf-version: '{karaf-version}'
254       - integration-distribution-git-url:
255           git-url: '{git-url}'
256       - maven-exec:
257           maven-version: mvn33
258
259     scm:
260       - integration-gerrit-scm:
261           basedir: '$GERRIT_PROJECT'
262           refspec: '$GERRIT_REFSPEC'
263           branch: '{branch}'
264       - integration-distribution-scm:
265           branch: '{branch}'
266
267     wrappers:
268       - opendaylight-infra-wrappers:
269           build-timeout: '720'
270
271     triggers:
272       - gerrit:
273           server-name: '{server-name}'
274           trigger-on:
275             - comment-added-contains-event:
276                 comment-contains-value: 'test-integration'
277           projects:
278             - project-compare-type: 'ANT'
279               project-pattern: '**'
280               branches:
281                 - branch-compare-type: 'ANT'
282                   branch-pattern: '**/{branch}'
283           skip-vote:
284             successful: true
285             failed: true
286             unstable: true
287             notbuilt: true
288
289     builders:
290       - integration-rebase-gerrit-patch
291       - wipe-org-opendaylight-repo
292       - provide-maven-settings:
293           global-settings-file: 'odl-global-settings'
294           settings-file: 'integration-settings'
295       - maven-target:
296           maven-version: 'mvn33'
297           pom: '$GERRIT_PROJECT/pom.xml'
298           goals: |
299               clean install dependency:tree -DoutputFile=dependency_tree.txt
300               -Pq
301               -Dstream={stream}
302               {opendaylight-infra-mvn-opts}
303           java-opts:
304             - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
305           settings: integration-settings
306           settings-type: cfp
307           global-settings: odl-global-settings
308           global-settings-type: cfp
309       - maven-target:
310           maven-version: mvn33
311           pom: distribution/pom.xml
312           goals: |
313               clean install dependency:tree -DoutputFile=dependency_tree.txt
314               {opendaylight-infra-mvn-opts}
315           java-opts:
316             - '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
317           settings: integration-settings
318           settings-type: cfp
319           global-settings: odl-global-settings
320           global-settings-type: cfp
321       - integration-upload-distribution:
322           dist-pom: distribution/pom.xml
323       - trigger-builds:
324           - project: '{csit-list}'
325             block: true
326             predefined-parameters: |
327               BUNDLE_URL=$BUNDLE_URL
328               KARAF_VERSION=$KARAF_VERSION
329
330     publishers:
331       - lf-infra-publish
332       - email-notification:
333           email-recipients: '{email-recipients}'
334           email-prefix: '[$GERRIT_PROJECT]'
335
336
337 - job-template:
338     name: 'integration-multipatch-test-{stream}'
339     # Goal: Build one or more patches and run all available system test on a distribution containing the change.
340     # Operation: This job template checks out and builds each patch provided in job parameters, creates a distribution
341     # containing these patches, and triggers the distribution test job which includes most (if not all) available
342     # CSIT jobs
343     # TODO: Move the following to appropriate readthedocs document.
344     # Recommended Sandbox usage:
345     # 0. Create this job and a CSIT job you want to run on the new .zip in Sandbox (disable timed triggers).
346     # 1. Copy the csit job name to clipboard.
347     # 2. Navigate to Sandbox page of this job.
348     # 3. Click "Configure".
349     # 4. Locate "Trigger/call builds on other projects" (under "Post Steps" tab).
350     # 5. Delete the long value of "Projects to build" field and paste the job name from clipboard (ctrl+a, ctrl+v).
351     # 6. Click "Save" button.
352     # 7. Click "Build with Parameters".
353     # yamllint disable-line rule:line-length
354     # 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
355     # 9. The multipatch job waits for the csit job to finish, so abort csit if you see something went wrong.
356     # 10. Navigate to Sandbox page of the csit job, click the run triggered from multipatch.
357     # 11. Click Parameters and copy the long value of BUNDLE_URL field to clipboard.
358     # 12. Run the same csit job woth different patchset or test options, or other csit jobs, with this BUNDLE_URL value
359     #     so you do not have to wait for multipatch build. Repeat step 12.
360     # 13. Currently, the .zip lasts 24 hours (?) so you may need to jump to step 2 (or 0) after some time.
361
362     project-type: freestyle
363     node: centos7-java-builder-8c-8g
364     jdk: '{jdk}'
365
366     properties:
367       - opendaylight-infra-properties:
368           build-days-to-keep: '{build-days-to-keep}'
369
370     parameters:
371       - patches-to-build-parameter:
372           patches_to_build: '$PATCHES_TO_BUILD'
373       - run-test-parameter:
374           run-test: 'false'
375       - integration-distribution-branch:
376           branch: '{branch}'
377       - distribution-karaf-version:
378           karaf-version: '{karaf-version}'
379       - opendaylight-infra-parameters:
380           os-cloud: '{os-cloud}'
381           project: 'integration/distribution'
382           branch: '{branch}'
383           refspec: 'refs/heads/{branch}'
384           artifacts: '{archive-artifacts} **/dependency_tree.txt'
385       - maven-exec:
386           maven-version: mvn33
387
388     wrappers:
389       - opendaylight-infra-wrappers:
390           build-timeout: '1200'
391
392     builders:
393       - wipe-org-opendaylight-repo
394       - integration-multipatch-builder
395       - provide-maven-settings:
396           global-settings-file: 'odl-global-settings'
397           settings-file: 'yangtools-settings'
398       - maven-target:
399           maven-version: mvn33
400           pom: patch_tester/pom.xml
401           # TODO: Make Maven options configurable. Currently tests are not skipped, everything else is.
402           goals: |
403               clean install dependency:tree -DoutputFile=dependency_tree.txt
404               -Pq
405               -Dstream={stream}
406               {opendaylight-infra-mvn-opts}
407           java-opts:
408             - '-Xmx7168m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
409           settings: integration-settings
410           settings-type: cfp
411           global-settings: odl-global-settings
412           global-settings-type: cfp
413       - integration-upload-distribution:
414           dist-pom: patch_tester/distribution/pom.xml
415       - conditional-step:
416           condition-kind: boolean-expression
417           condition-expression: $RUNTEST
418           steps:
419             - trigger-builds:
420                 - project: '{csit-list}'
421                   block: true
422                   predefined-parameters: |
423                     BUNDLE_URL=$BUNDLE_URL
424                     KARAF_VERSION=$KARAF_VERSION
425
426     publishers:
427       - lf-infra-publish
428       - email-notification:
429           email-recipients: '{email-recipients}'
430           email-prefix: '[int/dist]'
431
432 - job-template:
433     name: 'integration-distribution-weekly-test-trigger-{stream}'
434
435     project-type: freestyle
436     node: centos7-robot-2c-2g
437
438     properties:
439       - opendaylight-infra-properties:
440           build-days-to-keep: '{build-days-to-keep}'
441
442     parameters:
443       - integration-bundle-url:
444           bundle-url: '{bundle-url}'
445       - distribution-karaf-version:
446           karaf-version: '{karaf-version}'
447
448     triggers:
449       - timed: '{schedule-weekly}'
450
451     builders:
452       - trigger-builds:
453           - project: '{csit-weekly-list}'
454             block: true
455             predefined-parameters: |
456               BUNDLE_URL=$BUNDLE_URL
457               KARAF_VERSION=$KARAF_VERSION
458
459     publishers:
460       - email-notification:
461           email-recipients: '{email-recipients}'
462           email-prefix: '[integration]'
463
464 - job-template:
465     name: 'integration-distribution-high-frequency-test-trigger-{stream}'
466
467     project-type: freestyle
468     node: centos7-robot-2c-2g
469
470     properties:
471       - opendaylight-infra-properties:
472           build-days-to-keep: '{build-days-to-keep}'
473
474     parameters:
475       - integration-bundle-url:
476           bundle-url: '{bundle-url}'
477       - distribution-karaf-version:
478           karaf-version: '{karaf-version}'
479
480     triggers:
481       - timed: '{schedule-high-frequency}'
482
483     builders:
484       - trigger-builds:
485           - project: '{csit-high-frequency-list}'
486             block: true
487             predefined-parameters: |
488               BUNDLE_URL=$BUNDLE_URL
489               KARAF_VERSION=$KARAF_VERSION
490
491     publishers:
492       - email-notification:
493           email-recipients: '{email-recipients}'
494           email-prefix: '[integration]'