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