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