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