Create a queue for distro-test jobs
[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-disttest-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-4c-4g
258     jdk: '{java-version}'
259
260     properties:
261       - opendaylight-infra-properties:
262           build-days-to-keep: '{build-days-to-keep}'
263
264     parameters:
265       - patches-to-build-parameter:
266           patches_to_build: '$PATCHES_TO_BUILD'
267       - run-test-parameter:
268           run-test: 'false'
269       - integration-distribution-branch:
270           branch: '{branch}'
271       - integration-distribution-stream:
272           stream: '{stream}'
273       - distribution-karaf-version:
274           karaf-version: '{karaf-version}'
275       - opendaylight-infra-parameters:
276           os-cloud: '{os-cloud}'
277           project: 'integration/distribution'
278           branch: '{branch}'
279           refspec: 'refs/heads/{branch}'
280           artifacts: '{archive-artifacts}'
281       - maven-exec:
282           maven-version: mvn35
283
284     wrappers:
285       - opendaylight-infra-wrappers:
286           build-timeout: '1200'
287
288     triggers:
289       - gerrit:
290           server-name: '{gerrit-server-name}'
291           trigger-on:
292             - comment-added-contains-event:
293                 comment-contains-value: 'multipatch-build:'
294           projects:
295             - project-compare-type: ANT
296               project-pattern: '**'
297               branches:
298                 - branch-compare-type: ANT
299                   branch-pattern: '**/{branch}'
300
301     builders:
302       - wipe-org-opendaylight-repo
303       - lf-maven-install:
304           mvn-version: '{mvn-version}'
305       - provide-maven-settings:
306           global-settings-file: 'global-settings'
307           settings-file: 'integration-distribution-settings'
308       - integration-multipatch-builder
309       - integration-upload-distribution:
310           dist-pom: patch_tester/distribution/pom.xml
311       - conditional-step:
312           condition-kind: boolean-expression
313           condition-expression: $RUNTEST
314           steps:
315             - trigger-builds:
316                 - project: '{csit-list}'
317                   block: true
318                   predefined-parameters: |
319                     BUNDLE_URL=$BUNDLE_URL
320                     KARAF_VERSION=$KARAF_VERSION
321
322     publishers:
323       - lf-infra-publish
324       - email-notification:
325           email-recipients: '{email-recipients}'
326           email-prefix: '[int/dist]'
327
328 - job-template:
329     name: 'integration-distribution-weekly-test-trigger-{stream}'
330
331     project-type: freestyle
332     node: queue-disttest-2c-1g
333
334     properties:
335       - opendaylight-infra-properties:
336           build-days-to-keep: '{build-days-to-keep}'
337
338     parameters:
339       - integration-bundle-url:
340           bundle-url: '{bundle-url}'
341       - distribution-karaf-version:
342           karaf-version: '{karaf-version}'
343
344     triggers:
345       - timed: '{schedule-weekly}'
346
347     builders:
348       - trigger-builds:
349           - project: '{csit-weekly-list}'
350             block: true
351             predefined-parameters: |
352               BUNDLE_URL=$BUNDLE_URL
353               KARAF_VERSION=$KARAF_VERSION
354
355     publishers:
356       - email-notification:
357           email-recipients: '{email-recipients}'
358           email-prefix: '[integration]'
359
360 - job-template:
361     name: 'integration-distribution-high-frequency-test-trigger-{stream}'
362
363     project-type: freestyle
364     node: queue-disttest-2c-1g
365
366     properties:
367       - opendaylight-infra-properties:
368           build-days-to-keep: '{build-days-to-keep}'
369
370     parameters:
371       - integration-bundle-url:
372           bundle-url: '{bundle-url}'
373       - distribution-karaf-version:
374           karaf-version: '{karaf-version}'
375
376     triggers:
377       - timed: '{schedule-high-frequency}'
378
379     builders:
380       - trigger-builds:
381           - project: '{csit-high-frequency-list}'
382             block: true
383             predefined-parameters: |
384               BUNDLE_URL=$BUNDLE_URL
385               KARAF_VERSION=$KARAF_VERSION
386
387     publishers:
388       - email-notification:
389           email-recipients: '{email-recipients}'
390           email-prefix: '[integration]'
391
392 - job-template:
393     name: 'integration-update-csit-tests-{stream}'
394
395     # This job's purpose is to update csit
396     # tests to run in integration-distribution-test-{stream}
397     # by updating integration files: csit-list-{stream}.inc
398     # These files can be used as !include in int-dist-test-{stream}
399
400     ######################
401     # Default parameters #
402     ######################
403
404     git-url: '$GIT_URL/$PROJECT'
405     submodule-recursive: true
406
407     #####################
408     # Job Configuration #
409     #####################
410
411     project-type: freestyle
412     node: centos7-builder-2c-8g
413
414     properties:
415       - lf-infra-properties:
416           build-days-to-keep: 7
417
418     parameters:
419       - lf-infra-parameters:
420           project: releng/builder  # Hardcode as this job needs to pull releng/builder
421           stream: '{stream}'
422           branch: master  # Hardcode as releng/builder only has master
423           lftools-version: '{lftools-version}'
424       - string:
425           name: CSIT_BLACKLIST
426           default: '{csit-blacklist}'
427           description: Space separated list of jobs strings to blacklist.
428
429     scm:
430       - lf-infra-gerrit-scm:
431           jenkins-ssh-credential: '{jenkins-ssh-credential}'
432           git-url: '{git-url}'
433           refspec: '$GERRIT_REFSPEC'
434           branch: '$GERRIT_BRANCH'
435           submodule-recursive: '{submodule-recursive}'
436           choosing-strategy: default
437
438     wrappers:
439       - lf-infra-wrappers:
440           build-timeout: 10
441           jenkins-ssh-credential: '{jenkins-ssh-credential}'
442
443     triggers:
444       - reverse:
445           jobs: builder-jjb-merge
446
447     builders:
448       - shell: !include-raw-escape: update-csit-tests.sh
449       - shell: |
450           git status
451           git add jjb/integration/*.lst
452       - opendaylight-infra-push-gerrit-patch:
453           project: "releng/builder"
454           gerrit-topic: "auto-update-csit-jobs-{stream}"
455           gerrit-commit-message: "Auto Update CSIT Jobs to run for {stream}"
456
457     publishers:
458       - lf-infra-publish