Merge "Add netvirt csit job for TDD and/or WIP code"
[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
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
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           # TODO: {opendaylight-infra-parallel-mvn-opts}?
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-parallel-mvn-opts}
208           java-opts:
209             - '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
210           settings: integration-settings
211           settings-type: cfp
212           global-settings: global-settings
213           global-settings-type: cfp
214       - integration-upload-distribution:
215           dist-pom: distribution/pom.xml
216       - trigger-builds:
217           - project: '{csit-list}'
218             block: true
219             predefined-parameters: |
220               BUNDLE_URL=$BUNDLE_URL
221               KARAF_VERSION=$KARAF_VERSION
222
223     publishers:
224       - lf-infra-publish
225       - email-notification:
226           email-recipients: '{email-recipients}'
227           email-prefix: '[$GERRIT_PROJECT]'
228
229
230 - job-template:
231     name: 'integration-multipatch-test-{stream}'
232     # Goal: Build one or more patches and run all available system test on a distribution containing the change.
233     # Operation: This job template checks out and builds in order each patch provided in job parameters, finally
234     # it creates a distribution containing all patches and triggers the distribution test job which includes most
235     # (if not all) available CSIT jobs.
236
237     project-type: freestyle
238     node: centos7-builder-4c-4g
239     jdk: '{jdk}'
240
241     properties:
242       - opendaylight-infra-properties:
243           build-days-to-keep: '{build-days-to-keep}'
244
245     parameters:
246       - patches-to-build-parameter:
247           patches_to_build: '$PATCHES_TO_BUILD'
248       - run-test-parameter:
249           run-test: 'false'
250       - integration-distribution-branch:
251           branch: '{branch}'
252       - integration-distribution-stream:
253           stream: '{stream}'
254       - distribution-karaf-version:
255           karaf-version: '{karaf-version}'
256       - opendaylight-infra-parameters:
257           os-cloud: '{os-cloud}'
258           project: 'integration/distribution'
259           branch: '{branch}'
260           refspec: 'refs/heads/{branch}'
261           artifacts: '{archive-artifacts}'
262       - maven-exec:
263           maven-version: mvn33
264
265     wrappers:
266       - opendaylight-infra-wrappers:
267           build-timeout: '1200'
268
269     triggers:
270       - gerrit:
271           server-name: '{gerrit-server-name}'
272           trigger-on:
273             - comment-added-contains-event:
274                 comment-contains-value: 'multipatch-build:'
275           projects:
276             - project-compare-type: ANT
277               project-pattern: '**'
278               branches:
279                 - branch-compare-type: ANT
280                   branch-pattern: '**/{branch}'
281
282     builders:
283       - wipe-org-opendaylight-repo
284       - lf-maven-install:
285           mvn-version: '{mvn-version}'
286       - provide-maven-settings:
287           global-settings-file: 'global-settings'
288           settings-file: 'integration-distribution-settings'
289       - integration-multipatch-builder
290       - integration-upload-distribution:
291           dist-pom: patch_tester/distribution/pom.xml
292       - conditional-step:
293           condition-kind: boolean-expression
294           condition-expression: $RUNTEST
295           steps:
296             - trigger-builds:
297                 - project: '{csit-list}'
298                   block: true
299                   predefined-parameters: |
300                     BUNDLE_URL=$BUNDLE_URL
301                     KARAF_VERSION=$KARAF_VERSION
302
303     publishers:
304       - lf-infra-publish
305       - email-notification:
306           email-recipients: '{email-recipients}'
307           email-prefix: '[int/dist]'
308
309 - job-template:
310     name: 'integration-distribution-weekly-test-trigger-{stream}'
311
312     project-type: freestyle
313     node: centos7-robot-2c-8g
314
315     properties:
316       - opendaylight-infra-properties:
317           build-days-to-keep: '{build-days-to-keep}'
318
319     parameters:
320       - integration-bundle-url:
321           bundle-url: '{bundle-url}'
322       - distribution-karaf-version:
323           karaf-version: '{karaf-version}'
324
325     triggers:
326       - timed: '{schedule-weekly}'
327
328     builders:
329       - trigger-builds:
330           - project: '{csit-weekly-list}'
331             block: true
332             predefined-parameters: |
333               BUNDLE_URL=$BUNDLE_URL
334               KARAF_VERSION=$KARAF_VERSION
335
336     publishers:
337       - email-notification:
338           email-recipients: '{email-recipients}'
339           email-prefix: '[integration]'
340
341 - job-template:
342     name: 'integration-distribution-high-frequency-test-trigger-{stream}'
343
344     project-type: freestyle
345     node: centos7-robot-2c-8g
346
347     properties:
348       - opendaylight-infra-properties:
349           build-days-to-keep: '{build-days-to-keep}'
350
351     parameters:
352       - integration-bundle-url:
353           bundle-url: '{bundle-url}'
354       - distribution-karaf-version:
355           karaf-version: '{karaf-version}'
356
357     triggers:
358       - timed: '{schedule-high-frequency}'
359
360     builders:
361       - trigger-builds:
362           - project: '{csit-high-frequency-list}'
363             block: true
364             predefined-parameters: |
365               BUNDLE_URL=$BUNDLE_URL
366               KARAF_VERSION=$KARAF_VERSION
367
368     publishers:
369       - email-notification:
370           email-recipients: '{email-recipients}'
371           email-prefix: '[integration]'
372
373 - job-template:
374     name: 'integration-update-csit-tests-{stream}'
375
376     # This job's purpose is to update csit
377     # tests to run in integration-distribution-test-{stream}
378     # by updating integration files: csit-list-{stream}.inc
379     # These files can be used as !include in int-dist-test-{stream}
380
381     ######################
382     # Default parameters #
383     ######################
384
385     git-url: '$GIT_URL/$PROJECT'
386     submodule-recursive: true
387
388     #####################
389     # Job Configuration #
390     #####################
391
392     project-type: freestyle
393     node: centos7-builder-2c-8g
394
395     properties:
396       - lf-infra-properties:
397           build-days-to-keep: 7
398
399     parameters:
400       - lf-infra-parameters:
401           project: releng/builder  # Hardcode as this job needs to pull releng/builder
402           stream: '{stream}'
403           branch: master  # Hardcode as releng/builder only has master
404           lftools-version: '{lftools-version}'
405       - string:
406           name: CSIT_BLACKLIST
407           default: '{csit-blacklist}'
408           description: Space separated list of jobs strings to blacklist.
409
410     scm:
411       - lf-infra-gerrit-scm:
412           jenkins-ssh-credential: '{jenkins-ssh-credential}'
413           git-url: '{git-url}'
414           refspec: '$GERRIT_REFSPEC'
415           branch: '$GERRIT_BRANCH'
416           submodule-recursive: '{submodule-recursive}'
417           choosing-strategy: default
418
419     wrappers:
420       - lf-infra-wrappers:
421           build-timeout: 10
422           jenkins-ssh-credential: '{jenkins-ssh-credential}'
423
424     triggers:
425       - reverse:
426           jobs: builder-jjb-merge
427
428     builders:
429       - shell: !include-raw-escape: update-csit-tests.sh
430       - shell: |
431           git status
432           git add jjb/integration/*.lst
433       - opendaylight-infra-push-gerrit-patch:
434           project: "releng/builder"
435           gerrit-topic: "auto-update-csit-jobs-{stream}"
436           gerrit-commit-message: "Auto Update CSIT Jobs to run for {stream}"
437
438     publishers:
439       - lf-infra-publish