Merge "Move sxp Sonar scan to Sonarcloud"
[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     jobs:
7       - 'integration-patch-test-{stream}'
8       - 'inttest-multipatch'
9       - 'integration-merge-dashboard'
10       - '{project-name}-rtd-jobs':
11           build-node: centos7-builder-2c-2g
12           project-pattern: integration/test
13           rtd-build-url: https://readthedocs.org/api/v2/webhook/odl-integrationtest/32934/
14           rtd-token: 70766f97941a74ef80b84749ac4799e5ddeee99a
15       - gerrit-tox-verify:
16           branch: master
17           stream: master
18
19     # CSIT Lists in defaults.yaml
20     stream:
21       - aluminium:
22           branch: 'master'
23           mvn-version: 'mvn35'
24           java-version: 'openjdk11'
25           csit-list: !include: csit-jobs-aluminium.lst
26           build-order: >
27               odlparent yangtools mdsal infrautils controller serviceutils aaa netconf
28               daexim jsonrpc ovsdb neutron openflowplugin genius lispflowmapping netvirt
29               bgpcep integration/distribution
30
31       - magnesium:
32           branch: 'stable/magnesium'
33           mvn-version: 'mvn35'
34           java-version: 'openjdk11'
35           csit-list: !include: csit-jobs-magnesium.lst
36           build-order: >
37               odlparent yangtools mdsal infrautils controller serviceutils aaa netconf
38               daexim jsonrpc ovsdb neutron openflowplugin genius lispflowmapping netvirt
39               bgpcep integration/distribution
40
41       - sodium:
42           branch: 'stable/sodium'
43           mvn-version: 'mvn35'
44           csit-list: !include: csit-jobs-sodium.lst
45           build-order: >
46               odlparent yangtools mdsal infrautils controller serviceutils aaa netconf
47               daexim ovsdb neutron openflowplugin coe genius lispflowmapping sfc netvirt
48               bgpcep integration/distribution
49
50 - project:
51     name: integration-distribution
52     project: integration/test
53     project-name: integration-test
54     jobs:
55       - 'integration-distribution-test-{stream}'
56       - 'integration-distribution-mri-test-{stream}'
57       - 'integration-distribution-weekly-test-trigger-{stream}'
58       - 'integration-update-csit-tests-{stream}'
59
60     # CSIT Lists in defaults.yaml
61     stream:
62       - aluminium:
63           branch: 'master'
64           csit-blacklist: >
65               alto bier coe detnet dluxapps groupbasedpolicy l2switch mdsal nemo
66               p4plugin packetcable sfc sxp telemetry tsdr unimgr usc yangtools
67               gate longevity sanity tdd tempest wip
68               netvirt-csit-1node-1cmb-0ctl-0cmp-openstack-pike
69               netvirt-csit-1node-1cmb-0ctl-0cmp-openstack-queens-upstream-stateful-itm-direct
70               netvirt-csit-3node-1cmb
71               last-line-is-ignored-so-we-need-something-dummy-here-to-make-sure-the-real-last-line-is-used
72           csit-list: !include: csit-jobs-aluminium.lst
73           csit-mri-list: '{csit-mri-list-aluminium}'
74           csit-weekly-list: '{csit-weekly-list-aluminium}'
75       - magnesium:
76           branch: 'stable/magnesium'
77           csit-blacklist: >
78               alto bier coe detnet dluxapps groupbasedpolicy l2switch mdsal nemo
79               p4plugin packetcable sfc sxp telemetry tsdr unimgr usc yangtools
80               gate longevity sanity tdd tempest wip
81               netvirt-csit-1node-1cmb-0ctl-0cmp-openstack-pike
82               netvirt-csit-1node-1cmb-0ctl-0cmp-openstack-queens-upstream-stateful-itm-direct
83               netvirt-csit-3node-1cmb
84               last-line-is-ignored-so-we-need-something-dummy-here-to-make-sure-the-real-last-line-is-used
85           csit-list: !include: csit-jobs-magnesium.lst
86           csit-mri-list: '{csit-mri-list-magnesium}'
87           csit-weekly-list: '{csit-weekly-list-magnesium}'
88       - sodium:
89           branch: 'stable/sodium'
90           csit-blacklist: >
91               alto bier dluxapps groupbasedpolicy jsonrpc l2switch mdsal nemo
92               p4plugin packetcable sxp telemetry tsdr unimgr usc yangtools
93               gate longevity sanity tdd tempest wip
94               netvirt-csit-1node-1cmb-0ctl-0cmp-openstack-pike
95               netvirt-csit-1node-1cmb-0ctl-0cmp-openstack-queens-upstream-stateful-itm-direct
96               netvirt-csit-3node-1cmb
97               last-line-is-ignored-so-we-need-something-dummy-here-to-make-sure-the-real-last-line-is-used
98           csit-list: !include: csit-jobs-sodium.lst
99           csit-mri-list: '{csit-mri-list-sodium}'
100           csit-weekly-list: '{csit-weekly-list-sodium}'
101
102 - project:
103     name: integration-sanity
104     project: integration/test
105     project-name: integration-test
106     jobs:
107       - 'integration-sanity-test-{stream}'
108
109     stream:
110       - aluminium:
111           branch: 'master'
112           karaf-version: odl
113           csit-sanity-list: '{csit-sanity-list-aluminium}'
114       - magnesium:
115           branch: 'stable/magnesium'
116           karaf-version: odl
117           csit-sanity-list: '{csit-sanity-list-magnesium}'
118       - sodium:
119           branch: 'stable/sodium'
120           karaf-version: odl
121           csit-sanity-list: '{csit-sanity-list-sodium}'
122
123 - job-template:
124     name: 'integration-merge-dashboard'
125     project-type: freestyle
126     node: centos7-builder-2c-1g
127
128     properties:
129       - opendaylight-infra-properties:
130           build-days-to-keep: '{build-days-to-keep}'
131
132     parameters:
133       - opendaylight-infra-parameters:
134           os-cloud: '{os-cloud}'
135           project: '{project}'
136           branch: 'master'
137           refspec: 'refs/heads/master'
138           artifacts: '{archive-artifacts}'
139
140     scm:
141       - integration-gerrit-scm:
142           basedir: 'test'
143           refspec: '$GERRIT_REFSPEC'
144           branch: 'master'
145
146     wrappers:
147       - opendaylight-infra-wrappers:
148           build-timeout: '{build-timeout}'
149
150     triggers:
151       - gerrit-trigger-patch-merged:
152           gerrit-server-name: '{gerrit-server-name}'
153           name: '{project}'
154           branch: 'master'
155           files: 'dashboard/**'
156           forbidden-files: ''
157
158     builders:
159       - lf-infra-pre-build
160       - config-file-provider:
161           files:
162             - file-id: odl-elastic-cloud
163               target: '$HOME/.netrc'
164       - integration-install-robotframework
165       # yamllint disable-line rule:line-length
166       - shell: python3 $WORKSPACE/test/csit/scripts/push_dashboard.py a4ff38b99ef2c7626450543021b4c134.us-east-1.aws.found.io:9243
167
168     publishers:
169       - lf-infra-publish
170       - email-notification:
171           email-recipients: '{email-recipients}'
172           email-prefix: '[{project-name}]'
173
174 - job-template:
175     name: '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     project-type: freestyle
180     node: queue-disttest-2c-1g
181
182     properties:
183       - opendaylight-infra-properties:
184           build-days-to-keep: '{build-days-to-keep}'
185
186     parameters:
187       - integration-bundle-url:
188           bundle-url: '{bundle-url}'
189       - distribution-karaf-version:
190           karaf-version: '{karaf-version}'
191
192     builders:
193       - lf-infra-pre-build
194       - trigger-builds:
195           - project: '{csit-list}'
196             block: true
197             predefined-parameters: |
198               BUNDLE_URL=$BUNDLE_URL
199               KARAF_VERSION=$KARAF_VERSION
200
201     wrappers:
202       - lf-infra-wrappers:
203           build-timeout: 1440
204           jenkins-ssh-credential: '{jenkins-ssh-credential}'
205
206     publishers:
207       - opendaylight-infra-generate-csit-status-report
208       - email-notification:
209           email-recipients: '{email-recipients}'
210           email-prefix: '[integration]'
211       - lf-infra-publish
212
213 - job-template:
214     name: 'integration-sanity-test-{stream}'
215     # Goal: Verify a distribution through sanity test
216     # Operation: This template takes a distribution and passes sanity test
217     # This jobs works for both managed & unmanaged distro.
218
219     project-type: freestyle
220     node: queue-intque-2c-1g
221
222     properties:
223       - opendaylight-infra-properties:
224           build-days-to-keep: '{build-days-to-keep}'
225
226     parameters:
227       - integration-bundle-url:
228           bundle-url: '{bundle-url}'
229       - distribution-karaf-version:
230           karaf-version: '{karaf-version}'
231
232     triggers:
233       - timed: '{schedule-daily}'
234
235     builders:
236       - lf-infra-pre-build
237       - trigger-builds:
238           - project: '{csit-sanity-list}'
239             block: true
240             predefined-parameters: |
241               BUNDLE_URL=$BUNDLE_URL
242               KARAF_VERSION=$KARAF_VERSION
243
244     publishers:
245       - email-notification:
246           email-recipients: '{email-recipients}'
247           email-prefix: '[integration]'
248
249 - job-template:
250     name: 'integration-patch-test-{stream}'
251     # Template: integration-patch-test-{stream}
252     # Goal: Build a patch and run all available system test on a distribution containing the change
253     # Operation: This job template builds a patch, creates a distribution containing the patch, and
254     # triggers the distribution test when test-integration is used in gerrit comments
255
256     project-type: freestyle
257     node: centos7-builder-2c-8g
258
259     properties:
260       - opendaylight-infra-properties:
261           build-days-to-keep: '{build-days-to-keep}'
262
263     parameters:
264       - opendaylight-infra-parameters:
265           os-cloud: '{os-cloud}'
266           project: '$GERRIT_PROJECT'
267           branch: '{branch}'
268           refspec: '$GERRIT_REFSPEC'
269           artifacts: '{archive-artifacts}'
270       - integration-distribution-branch:
271           branch: '{branch}'
272       - distribution-karaf-version:
273           karaf-version: '{karaf-version}'
274       - integration-distribution-git-url:
275           git-url: '{git-url}'
276       - maven-exec:
277           maven-version: mvn35
278
279     scm:
280       - integration-gerrit-scm:
281           basedir: '$GERRIT_PROJECT'
282           refspec: '$GERRIT_REFSPEC'
283           branch: '{branch}'
284       - integration-distribution-scm:
285           branch: '{branch}'
286
287     wrappers:
288       - opendaylight-infra-wrappers:
289           build-timeout: '720'
290
291     triggers:
292       - gerrit:
293           server-name: '{gerrit-server-name}'
294           trigger-on:
295             - comment-added-contains-event:
296                 comment-contains-value: 'test-integration'
297           projects:
298             - project-compare-type: 'ANT'
299               project-pattern: '**'
300               branches:
301                 - branch-compare-type: 'ANT'
302                   branch-pattern: '**/{branch}'
303           skip-vote:
304             successful: true
305             failed: true
306             unstable: true
307             notbuilt: true
308
309     builders:
310       - lf-infra-pre-build
311       - integration-rebase-gerrit-patch
312       - wipe-org-opendaylight-repo
313       - lf-provide-maven-settings:
314           global-settings-file: 'global-settings'
315           settings-file: 'integration-settings'
316       - lf-update-java-alternatives:
317           java-version: '{java-version}'
318       - maven-target:
319           maven-version: 'mvn35'
320           pom: '$GERRIT_PROJECT/pom.xml'
321           goals: |
322               clean install dependency:tree -DoutputFile=dependency_tree.txt
323               -Pq
324               -Dstream={stream}
325               {opendaylight-infra-mvn-opts}
326           # {opendaylight-infra-parallel-mvn-opts} is bad when there are multiple big features in SFT.
327           java-opts:
328             - '-Xmx4096m -Dmaven.compile.fork=true'
329           settings: integration-settings
330           settings-type: cfp
331           global-settings: global-settings
332           global-settings-type: cfp
333       - maven-target:
334           maven-version: mvn35
335           pom: distribution/pom.xml
336           goals: |
337               clean install dependency:tree -DoutputFile=dependency_tree.txt
338               {opendaylight-infra-mvn-opts}
339           # {opendaylight-infra-parallel-mvn-opts} is bad when there are multiple big features in SFT.
340           java-opts:
341             - '-Xmx1024m -Dmaven.compile.fork=true'
342           settings: integration-settings
343           settings-type: cfp
344           global-settings: global-settings
345           global-settings-type: cfp
346       - integration-upload-distribution:
347           dist-pom: distribution/pom.xml
348       - trigger-builds:
349           - project: '{csit-list}'
350             block: true
351             predefined-parameters: |
352               BUNDLE_URL=$BUNDLE_URL
353               KARAF_VERSION=$KARAF_VERSION
354
355     publishers:
356       - lf-infra-publish
357       - email-notification:
358           email-recipients: '{email-recipients}'
359           email-prefix: '[$GERRIT_PROJECT]'
360
361
362 - job-template:
363     name: '{prefix}integration-multipatch-test-{stream}'
364     # Goal: Build one or more patches and run all available system test on a distribution containing the change.
365     # Operation: This job template checks out and builds in order each patch provided in job parameters, finally
366     # it creates a distribution containing all patches and triggers the distribution test job which includes most
367     # (if not all) available CSIT jobs.
368
369     id: inttest-multipatch
370     project-type: freestyle
371     node: centos7-builder-8c-8g
372     concurrent: true
373
374     properties:
375       - opendaylight-infra-properties:
376           build-days-to-keep: '{build-days-to-keep}'
377
378     parameters:
379       - string:
380           name: PATCHES_TO_BUILD
381           default: '$PATCHES_TO_BUILD'
382           description: |
383               Ordered list of patches to build in the format of project=changeset (checkout) or
384               project:changeset (cherry-pick) for example: genius=32/53632/9,netvirt:59/50259/47.
385       - string:
386           name: BUILD_ORDER
387           default: '{build-order}'
388           description: 'Build order for multipatch test when topic is used'
389       - string:
390           name: BUILD_FAST
391           default: 'true'
392           description: 'Set true to build fast -Pq'
393       - string:
394           name: BUILD_NORMAL
395           default: ''
396           description: 'List of projects to build normal (no -Pq) when BUILD_FAST=true'
397       - string:
398           name: RUN_TEST
399           default: 'false'
400           description: 'Set true to run test after build'
401       - integration-distribution-branch:
402           branch: '{branch}'
403       - integration-distribution-stream:
404           stream: '{stream}'
405       - distribution-karaf-version:
406           karaf-version: '{karaf-version}'
407       - opendaylight-infra-parameters:
408           os-cloud: '{os-cloud}'
409           project: 'integration/distribution'
410           branch: '{branch}'
411           refspec: 'refs/heads/{branch}'
412           artifacts: '{archive-artifacts}'
413       - lf-infra-maven-parameters:
414           mvn-opts: ''
415           mvn-params: ''
416           mvn-version: mvn35
417           staging-profile-id: ''  # Staging repos do not make sense for this job
418
419     wrappers:
420       - opendaylight-infra-wrappers:
421           build-timeout: '1200'
422
423     triggers:
424       - gerrit:
425           server-name: '{gerrit-server-name}'
426           trigger-on:
427             - comment-added-contains-event:
428                 comment-contains-value: 'multipatch-build'
429           projects:
430             - project-compare-type: ANT
431               project-pattern: '**'
432               branches:
433                 - branch-compare-type: ANT
434                   branch-pattern: '**/{branch}'
435
436     builders:
437       - lf-infra-pre-build
438       - wipe-org-opendaylight-repo
439       - lf-maven-install:
440           mvn-version: '{mvn-version}'
441       - lf-provide-maven-settings:
442           global-settings-file: 'global-settings'
443           settings-file: 'integration-distribution-settings'
444       - lf-update-java-alternatives:
445           java-version: '{java-version}'
446       - integration-multipatch-builder
447       - integration-upload-distribution:
448           dist-pom: patch_tester/distribution/pom.xml
449       - conditional-step:
450           condition-kind: boolean-expression
451           condition-expression: $RUN_TEST
452           steps:
453             - trigger-builds:
454                 - project: >
455                       integration-distribution-test-{stream},
456                       integration-distribution-mri-test-{stream}
457                   predefined-parameters: |
458                     BUNDLE_URL=$BUNDLE_URL
459                     KARAF_VERSION=$KARAF_VERSION
460
461     publishers:
462       - lf-infra-publish
463       - email-notification:
464           email-recipients: '{email-recipients}'
465           email-prefix: '[int/dist]'
466
467 - job-template:
468     name: 'integration-distribution-mri-test-{stream}'
469
470     project-type: freestyle
471     node: queue-intque-2c-1g
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-weekly}'
485
486     builders:
487       - trigger-builds:
488           - project: '{csit-mri-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]'
498
499 - job-template:
500     name: 'integration-distribution-weekly-test-trigger-{stream}'
501
502     project-type: freestyle
503     node: queue-intque-2c-1g
504
505     properties:
506       - opendaylight-infra-properties:
507           build-days-to-keep: '{build-days-to-keep}'
508
509     parameters:
510       - integration-bundle-url:
511           bundle-url: '{bundle-url}'
512       - distribution-karaf-version:
513           karaf-version: '{karaf-version}'
514
515     triggers:
516       - timed: '{schedule-weekly}'
517
518     builders:
519       - trigger-builds:
520           - project: '{csit-weekly-list}'
521             block: true
522             predefined-parameters: |
523               BUNDLE_URL=$BUNDLE_URL
524               KARAF_VERSION=$KARAF_VERSION
525
526     publishers:
527       - email-notification:
528           email-recipients: '{email-recipients}'
529           email-prefix: '[integration]'
530
531 - job-template:
532     name: 'integration-update-csit-tests-{stream}'
533
534     # This job's purpose is to update csit
535     # tests to run in integration-distribution-test-{stream}
536     # by updating integration files: csit-list-{stream}.inc
537     # These files can be used as !include in int-dist-test-{stream}
538
539     ######################
540     # Default parameters #
541     ######################
542
543     git-url: '$GIT_URL/$PROJECT'
544     submodule-disable: false
545     submodule-recursive: true
546     submodule-timeout: 10
547
548     #####################
549     # Job Configuration #
550     #####################
551
552     project-type: freestyle
553     node: centos7-builder-2c-2g
554
555     properties:
556       - lf-infra-properties:
557           build-days-to-keep: 7
558
559     parameters:
560       - lf-infra-parameters:
561           project: releng/builder  # Hardcode as this job needs to pull releng/builder
562           stream: '{stream}'
563           branch: master  # Hardcode as releng/builder only has master
564           lftools-version: '{lftools-version}'
565       - string:
566           name: CSIT_BLACKLIST
567           default: '{csit-blacklist}'
568           description: Space separated list of jobs strings to blacklist.
569
570     scm:
571       - lf-infra-gerrit-scm:
572           jenkins-ssh-credential: '{jenkins-ssh-credential}'
573           git-url: '{git-url}'
574           refspec: '$GERRIT_REFSPEC'
575           branch: '$GERRIT_BRANCH'
576           submodule-disable: '{submodule-disable}'
577           submodule-recursive: '{submodule-recursive}'
578           submodule-timeout: '{submodule-timeout}'
579           choosing-strategy: default
580
581     wrappers:
582       - lf-infra-wrappers:
583           build-timeout: 10
584           jenkins-ssh-credential: '{jenkins-ssh-credential}'
585
586     triggers:
587       - reverse:
588           jobs: builder-jjb-merge
589
590     builders:
591       - lf-infra-pre-build
592       - shell: !include-raw-escape: update-csit-tests.sh
593       - shell: |
594           git status
595           git add jjb/integration/*.lst
596       - lf-infra-push-gerrit-patch:
597           project: 'releng/builder'
598           gerrit-user: 'jenkins-$SILO'
599           gerrit-host: 'git.opendaylight.org'
600           gerrit-topic: 'auto-update-csit-jobs-{stream}'
601           gerrit-commit-message: 'Auto Update CSIT Jobs to run for {stream}'
602           reviewers-email: 'jluhrsen@gmail.com'
603
604     publishers:
605       - lf-infra-publish
606
607 - project:
608     name: integration-view
609     views:
610       - project-view
611     project-name: integration