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