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