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