da4fb8f3dffaa01135a6681d84e3b2b5b382dd50
[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       - 'integration-multipatch-test-{stream}'
9       - '{project-name}-rtd-jobs':
10           build-node: centos7-builder-2c-2g
11           project-pattern: integration/test
12           rtd-build-url: https://readthedocs.org/api/v2/webhook/odl-integrationtest/32934/
13           rtd-token: 70766f97941a74ef80b84749ac4799e5ddeee99a
14       - gerrit-tox-verify:
15           branch: master
16           stream: master
17
18     # CSIT Lists in defaults.yaml
19     stream:
20       - fluorine:
21           branch: 'master'
22           mvn-version: 'mvn35'
23           csit-list: !include: csit-jobs-fluorine.lst
24           build-order: >
25               odlparent yangtools infrautils mdsal controller aaa netconf daexim bgpcep
26               ovsdb neutron lispflowmapping openflowplugin coe genius sfc netvirt
27
28       - oxygen:
29           branch: 'stable/oxygen'
30           mvn-version: 'mvn35'
31           csit-list: !include: csit-jobs-oxygen.lst
32           build-order: >
33               odlparent yangtools infrautils mdsal controller aaa netconf daexim bgpcep
34               ovsdb neutron lispflowmapping openflowplugin coe genius sfc netvirt
35
36 - project:
37     name: integration-distribution
38     project: integration/test
39     project-name: integration-test
40     jobs:
41       - 'integration-distribution-test-{stream}'
42       - 'integration-distribution-weekly-test-trigger-{stream}'
43       - 'integration-distribution-high-frequency-test-trigger-{stream}'
44       - 'integration-update-csit-tests-{stream}'
45
46     # CSIT Lists in defaults.yaml
47     stream:
48       - fluorine:
49           branch: 'master'
50           csit-blacklist: >
51               alto bier capwap centinel didm dluxapps groupbasedpolicy iotdm jsonrpc lacp
52               l2switch messaging4transport nemo netide nic ocpplugin of-config p4plugin packetcable
53               sdninterfaceapp sxp tsdr unimgr usc usecplugin vtn gate longevity sanity tdd tempest wip
54           csit-list: !include: csit-jobs-fluorine.lst
55           csit-weekly-list: '{csit-weekly-list-fluorine}'
56           csit-high-frequency-list: '{csit-high-frequency-list-fluorine}'
57       - oxygen:
58           branch: 'stable/oxygen'
59           csit-blacklist: >
60               capwap centinel didm iotdm jsonrpc lacp messaging4transport netide nic
61               ocpplugin sdninterfaceapp unimgr usecplugin gate longevity sanity tdd tempest wip
62           csit-list: !include: csit-jobs-oxygen.lst
63           csit-weekly-list: '{csit-weekly-list-oxygen}'
64           csit-high-frequency-list: '{csit-high-frequency-list-oxygen}'
65
66 - project:
67     name: integration-sanity
68     project: integration/test
69     project-name: integration-test
70     jobs:
71       - 'integration-sanity-test-{stream}'
72
73     stream:
74       - fluorine:
75           branch: 'master'
76           karaf-version: odl
77           csit-sanity-list: '{csit-sanity-list-fluorine}'
78       - oxygen:
79           branch: 'stable/oxygen'
80           karaf-version: karaf4
81           csit-sanity-list: '{csit-sanity-list-oxygen}'
82
83 - job-template:
84     name: 'integration-distribution-test-{stream}'
85     # Goal: Verify a distribution through all system test available
86     # Operation: This template takes a distribution and passes all available system test
87
88     project-type: freestyle
89     node: queue-disttest-2c-1g
90
91     properties:
92       - opendaylight-infra-properties:
93           build-days-to-keep: '{build-days-to-keep}'
94
95     parameters:
96       - integration-bundle-url:
97           bundle-url: '{bundle-url}'
98       - distribution-karaf-version:
99           karaf-version: '{karaf-version}'
100
101     builders:
102       - trigger-builds:
103           - project: '{csit-list}'
104             block: true
105             predefined-parameters: |
106               BUNDLE_URL=$BUNDLE_URL
107               KARAF_VERSION=$KARAF_VERSION
108
109     publishers:
110       - opendaylight-infra-generate-csit-status-report
111       - email-notification:
112           email-recipients: '{email-recipients}'
113           email-prefix: '[integration]'
114       - lf-infra-publish
115
116 - job-template:
117     name: 'integration-sanity-test-{stream}'
118     # Goal: Verify a distribution through sanity test
119     # Operation: This template takes a distribution and passes sanity test
120     # This jobs works for both managed & unmanaged distro.
121
122     project-type: freestyle
123     node: queue-intque-2c-1g
124
125     properties:
126       - opendaylight-infra-properties:
127           build-days-to-keep: '{build-days-to-keep}'
128
129     parameters:
130       - integration-bundle-url:
131           bundle-url: '{bundle-url}'
132       - distribution-karaf-version:
133           karaf-version: '{karaf-version}'
134
135     triggers:
136       - timed: '{schedule-daily}'
137
138     builders:
139       - trigger-builds:
140           - project: '{csit-sanity-list}'
141             block: true
142             predefined-parameters: |
143               BUNDLE_URL=$BUNDLE_URL
144               KARAF_VERSION=$KARAF_VERSION
145
146     publishers:
147       - email-notification:
148           email-recipients: '{email-recipients}'
149           email-prefix: '[integration]'
150
151 - job-template:
152     name: 'integration-patch-test-{stream}'
153     # Template: integration-patch-test-{stream}
154     # Goal: Build a patch and run all available system test on a distribution containing the change
155     # Operation: This job template builds a patch, creates a distribution containing the patch, and
156     # triggers the distribution test when test-integration is used in gerrit comments
157
158     project-type: freestyle
159     node: centos7-builder-2c-8g
160
161     properties:
162       - opendaylight-infra-properties:
163           build-days-to-keep: '{build-days-to-keep}'
164
165     parameters:
166       - opendaylight-infra-parameters:
167           os-cloud: '{os-cloud}'
168           project: '$GERRIT_PROJECT'
169           branch: '{branch}'
170           refspec: '$GERRIT_REFSPEC'
171           artifacts: '{archive-artifacts}'
172       - integration-distribution-branch:
173           branch: '{branch}'
174       - distribution-karaf-version:
175           karaf-version: '{karaf-version}'
176       - integration-distribution-git-url:
177           git-url: '{git-url}'
178       - maven-exec:
179           maven-version: mvn35
180
181     scm:
182       - integration-gerrit-scm:
183           basedir: '$GERRIT_PROJECT'
184           refspec: '$GERRIT_REFSPEC'
185           branch: '{branch}'
186       - integration-distribution-scm:
187           branch: '{branch}'
188
189     wrappers:
190       - opendaylight-infra-wrappers:
191           build-timeout: '720'
192
193     triggers:
194       - gerrit:
195           server-name: '{gerrit-server-name}'
196           trigger-on:
197             - comment-added-contains-event:
198                 comment-contains-value: 'test-integration'
199           projects:
200             - project-compare-type: 'ANT'
201               project-pattern: '**'
202               branches:
203                 - branch-compare-type: 'ANT'
204                   branch-pattern: '**/{branch}'
205           skip-vote:
206             successful: true
207             failed: true
208             unstable: true
209             notbuilt: true
210
211     builders:
212       - integration-rebase-gerrit-patch
213       - wipe-org-opendaylight-repo
214       - provide-maven-settings:
215           global-settings-file: 'global-settings'
216           settings-file: 'integration-settings'
217       - maven-target:
218           maven-version: 'mvn35'
219           pom: '$GERRIT_PROJECT/pom.xml'
220           goals: |
221               clean install dependency:tree -DoutputFile=dependency_tree.txt
222               -Pq
223               -Dstream={stream}
224               {opendaylight-infra-mvn-opts}
225           # {opendaylight-infra-parallel-mvn-opts} is bad when there are multiple big features in SFT.
226           java-opts:
227             - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
228           settings: integration-settings
229           settings-type: cfp
230           global-settings: global-settings
231           global-settings-type: cfp
232       - maven-target:
233           maven-version: mvn35
234           pom: distribution/pom.xml
235           goals: |
236               clean install dependency:tree -DoutputFile=dependency_tree.txt
237               {opendaylight-infra-mvn-opts}
238           # {opendaylight-infra-parallel-mvn-opts} is bad when there are multiple big features in SFT.
239           java-opts:
240             - '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
241           settings: integration-settings
242           settings-type: cfp
243           global-settings: global-settings
244           global-settings-type: cfp
245       - integration-upload-distribution:
246           dist-pom: distribution/pom.xml
247       - trigger-builds:
248           - project: '{csit-list}'
249             block: true
250             predefined-parameters: |
251               BUNDLE_URL=$BUNDLE_URL
252               KARAF_VERSION=$KARAF_VERSION
253
254     publishers:
255       - lf-infra-publish
256       - email-notification:
257           email-recipients: '{email-recipients}'
258           email-prefix: '[$GERRIT_PROJECT]'
259
260
261 - job-template:
262     name: 'integration-multipatch-test-{stream}'
263     # Goal: Build one or more patches and run all available system test on a distribution containing the change.
264     # Operation: This job template checks out and builds in order each patch provided in job parameters, finally
265     # it creates a distribution containing all patches and triggers the distribution test job which includes most
266     # (if not all) available CSIT jobs.
267
268     project-type: freestyle
269     node: centos7-builder-8c-8g
270     concurrent: true
271     jdk: '{java-version}'
272
273     properties:
274       - opendaylight-infra-properties:
275           build-days-to-keep: '{build-days-to-keep}'
276
277     parameters:
278       - patches-to-build-parameter:
279           patches_to_build: '$PATCHES_TO_BUILD'
280       - build-order-parameter:
281           build-order: '{build-order}'
282       - build-fast-parameter:
283           build-fast: 'false'
284       - run-test-parameter:
285           run-test: 'false'
286       - integration-distribution-branch:
287           branch: '{branch}'
288       - integration-distribution-stream:
289           stream: '{stream}'
290       - distribution-karaf-version:
291           karaf-version: '{karaf-version}'
292       - opendaylight-infra-parameters:
293           os-cloud: '{os-cloud}'
294           project: 'integration/distribution'
295           branch: '{branch}'
296           refspec: 'refs/heads/{branch}'
297           artifacts: '{archive-artifacts}'
298       - lf-infra-maven-parameters:
299           mvn-opts: ''
300           mvn-params: ''
301           mvn-version: mvn35
302           staging-profile-id: ''  # Staging repos do not make sense for this job
303
304     wrappers:
305       - opendaylight-infra-wrappers:
306           build-timeout: '1200'
307
308     triggers:
309       - gerrit:
310           server-name: '{gerrit-server-name}'
311           trigger-on:
312             - comment-added-contains-event:
313                 comment-contains-value: 'multipatch-build'
314           projects:
315             - project-compare-type: ANT
316               project-pattern: '**'
317               branches:
318                 - branch-compare-type: ANT
319                   branch-pattern: '**/{branch}'
320
321     builders:
322       - wipe-org-opendaylight-repo
323       - lf-maven-install:
324           mvn-version: '{mvn-version}'
325       - provide-maven-settings:
326           global-settings-file: 'global-settings'
327           settings-file: 'integration-distribution-settings'
328       - integration-multipatch-builder
329       - integration-upload-distribution:
330           dist-pom: patch_tester/distribution/pom.xml
331       - conditional-step:
332           condition-kind: boolean-expression
333           condition-expression: $RUN_TEST
334           steps:
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       - lf-infra-publish
344       - email-notification:
345           email-recipients: '{email-recipients}'
346           email-prefix: '[int/dist]'
347
348 - job-template:
349     name: 'integration-distribution-weekly-test-trigger-{stream}'
350
351     project-type: freestyle
352     node: queue-intque-2c-1g
353
354     properties:
355       - opendaylight-infra-properties:
356           build-days-to-keep: '{build-days-to-keep}'
357
358     parameters:
359       - integration-bundle-url:
360           bundle-url: '{bundle-url}'
361       - distribution-karaf-version:
362           karaf-version: '{karaf-version}'
363
364     triggers:
365       - timed: '{schedule-weekly}'
366
367     builders:
368       - trigger-builds:
369           - project: '{csit-weekly-list}'
370             block: true
371             predefined-parameters: |
372               BUNDLE_URL=$BUNDLE_URL
373               KARAF_VERSION=$KARAF_VERSION
374
375     publishers:
376       - email-notification:
377           email-recipients: '{email-recipients}'
378           email-prefix: '[integration]'
379
380 - job-template:
381     name: 'integration-distribution-high-frequency-test-trigger-{stream}'
382
383     project-type: freestyle
384     node: queue-intque-2c-1g
385
386     properties:
387       - opendaylight-infra-properties:
388           build-days-to-keep: '{build-days-to-keep}'
389
390     parameters:
391       - integration-bundle-url:
392           bundle-url: '{bundle-url}'
393       - distribution-karaf-version:
394           karaf-version: '{karaf-version}'
395
396     triggers:
397       - timed: '{schedule-high-frequency}'
398
399     builders:
400       - trigger-builds:
401           - project: '{csit-high-frequency-list}'
402             block: true
403             predefined-parameters: |
404               BUNDLE_URL=$BUNDLE_URL
405               KARAF_VERSION=$KARAF_VERSION
406
407     publishers:
408       - email-notification:
409           email-recipients: '{email-recipients}'
410           email-prefix: '[integration]'
411
412 - job-template:
413     name: 'integration-update-csit-tests-{stream}'
414
415     # This job's purpose is to update csit
416     # tests to run in integration-distribution-test-{stream}
417     # by updating integration files: csit-list-{stream}.inc
418     # These files can be used as !include in int-dist-test-{stream}
419
420     ######################
421     # Default parameters #
422     ######################
423
424     git-url: '$GIT_URL/$PROJECT'
425     submodule-recursive: true
426
427     #####################
428     # Job Configuration #
429     #####################
430
431     project-type: freestyle
432     node: centos7-builder-2c-8g
433
434     properties:
435       - lf-infra-properties:
436           build-days-to-keep: 7
437
438     parameters:
439       - lf-infra-parameters:
440           project: releng/builder  # Hardcode as this job needs to pull releng/builder
441           stream: '{stream}'
442           branch: master  # Hardcode as releng/builder only has master
443           lftools-version: '{lftools-version}'
444       - string:
445           name: CSIT_BLACKLIST
446           default: '{csit-blacklist}'
447           description: Space separated list of jobs strings to blacklist.
448
449     scm:
450       - lf-infra-gerrit-scm:
451           jenkins-ssh-credential: '{jenkins-ssh-credential}'
452           git-url: '{git-url}'
453           refspec: '$GERRIT_REFSPEC'
454           branch: '$GERRIT_BRANCH'
455           submodule-recursive: '{submodule-recursive}'
456           choosing-strategy: default
457
458     wrappers:
459       - lf-infra-wrappers:
460           build-timeout: 10
461           jenkins-ssh-credential: '{jenkins-ssh-credential}'
462
463     triggers:
464       - reverse:
465           jobs: builder-jjb-merge
466
467     builders:
468       - shell: !include-raw-escape: update-csit-tests.sh
469       - shell: |
470           git status
471           git add jjb/integration/*.lst
472       - lf-infra-push-gerrit-patch:
473           project: 'releng/builder'
474           gerrit-user: 'jenkins-$SILO'
475           gerrit-host: 'git.opendaylight.org'
476           gerrit-topic: 'auto-update-csit-jobs-{stream}'
477           gerrit-commit-message: 'Auto Update CSIT Jobs to run for {stream}'
478           reviewers-email: 'jluhrsen@redhat.com'
479
480     publishers:
481       - lf-infra-publish
482
483 - view:
484     name: integration
485     description: 'List of integration jobs'
486     regex: '^integration-.*'
487     <<: *releng_view_common