Merge "Add jenkins param to use featuresBoot (or not)"
[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
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
29       - nitrogen:
30           branch: 'stable/nitrogen'
31           csit-blacklist: longevity gate sanity capwap centinel coe didm iotdm jsonrpc lacp netide tsdr
32           csit-list: !include: csit-jobs-nitrogen.lst
33           csit-sanity-list: '{csit-sanity-list-nitrogen}'
34           csit-weekly-list: '{csit-weekly-list-nitrogen}'
35           csit-high-frequency-list: '{csit-high-frequency-list-nitrogen}'
36
37       - carbon:
38           branch: 'stable/carbon'
39           karaf-version: karaf3
40           csit-blacklist: longevity gate sanity capwap centinel coe jsonrpc
41           csit-list: !include: csit-jobs-carbon.lst
42           csit-sanity-list: '{csit-sanity-list-carbon}'
43           csit-weekly-list: '{csit-weekly-list-carbon}'
44           csit-high-frequency-list: '{csit-high-frequency-list-carbon}'
45
46     # tools system image
47     tools_system_image: ZZCI - Ubuntu 16.04 - mininet-ovs-25 - 20171208-1847
48
49 # Template: integration-distribution-test-{stream}
50 # Goal: Verify a distribution through all system test available
51 # Operation: This template takes a distribution and passes all available system test
52
53 - job-template:
54     name: 'integration-distribution-test-{stream}'
55
56     project-type: freestyle
57     node: centos7-robot-2c-8g
58
59     properties:
60       - opendaylight-infra-properties:
61           build-days-to-keep: '{build-days-to-keep}'
62
63     parameters:
64       - integration-bundle-url:
65           bundle-url: '{bundle-url}'
66       - distribution-karaf-version:
67           karaf-version: '{karaf-version}'
68
69     builders:
70       - trigger-builds:
71           - project: '{csit-list}'
72             block: true
73             predefined-parameters: |
74               BUNDLE_URL=$BUNDLE_URL
75               KARAF_VERSION=$KARAF_VERSION
76
77     publishers:
78       - opendaylight-infra-generate-csit-status-report
79       - email-notification:
80           email-recipients: '{email-recipients}'
81           email-prefix: '[integration]'
82       - lf-infra-publish
83
84 # Template: integration-sanity-test-{stream}
85 # Goal: Verify a distribution through sanity test
86 # Operation: This template takes a distribution and passes sanity test
87
88 - job-template:
89     name: 'integration-sanity-test-{stream}'
90
91     project-type: freestyle
92     node: centos7-robot-2c-8g
93
94     properties:
95       - opendaylight-infra-properties:
96           build-days-to-keep: '{build-days-to-keep}'
97
98     parameters:
99       - integration-bundle-url:
100           bundle-url: '{bundle-url}'
101       - distribution-karaf-version:
102           karaf-version: '{karaf-version}'
103
104     builders:
105       - trigger-builds:
106           - project: '{csit-sanity-list}'
107             block: true
108             predefined-parameters: |
109               BUNDLE_URL=$BUNDLE_URL
110               KARAF_VERSION=$KARAF_VERSION
111
112     publishers:
113       - email-notification:
114           email-recipients: '{email-recipients}'
115           email-prefix: '[integration]'
116
117 # Template: integration-patch-test-{stream}
118 # Goal: Build a patch and run all available system test on a distribution containing the change
119 # Operation: This job template builds a patch, creates a distribution containing the patch, and
120 # triggers the distribution test when test-integration is used in gerrit comments
121
122 - job-template:
123     name: 'integration-patch-test-{stream}'
124
125     project-type: freestyle
126     node: centos7-java-builder-2c-8g
127
128     properties:
129       - opendaylight-infra-properties:
130           build-days-to-keep: '{build-days-to-keep}'
131
132     parameters:
133       - opendaylight-infra-parameters:
134           os-cloud: '{os-cloud}'
135           project: '$GERRIT_PROJECT'
136           branch: '{branch}'
137           refspec: '$GERRIT_REFSPEC'
138           artifacts: '{archive-artifacts}'
139       - integration-distribution-branch:
140           branch: '{branch}'
141       - distribution-karaf-version:
142           karaf-version: '{karaf-version}'
143       - integration-distribution-git-url:
144           git-url: '{git-url}'
145       - maven-exec:
146           maven-version: mvn33
147
148     scm:
149       - integration-gerrit-scm:
150           basedir: '$GERRIT_PROJECT'
151           refspec: '$GERRIT_REFSPEC'
152           branch: '{branch}'
153       - integration-distribution-scm:
154           branch: '{branch}'
155
156     wrappers:
157       - opendaylight-infra-wrappers:
158           build-timeout: '720'
159
160     triggers:
161       - gerrit:
162           server-name: '{gerrit-server-name}'
163           trigger-on:
164             - comment-added-contains-event:
165                 comment-contains-value: 'test-integration'
166           projects:
167             - project-compare-type: 'ANT'
168               project-pattern: '**'
169               branches:
170                 - branch-compare-type: 'ANT'
171                   branch-pattern: '**/{branch}'
172           skip-vote:
173             successful: true
174             failed: true
175             unstable: true
176             notbuilt: true
177
178     builders:
179       - integration-rebase-gerrit-patch
180       - wipe-org-opendaylight-repo
181       - provide-maven-settings:
182           global-settings-file: 'global-settings'
183           settings-file: 'integration-settings'
184       - maven-target:
185           maven-version: 'mvn33'
186           pom: '$GERRIT_PROJECT/pom.xml'
187           goals: |
188               clean install dependency:tree -DoutputFile=dependency_tree.txt
189               -Pq
190               -Dstream={stream}
191               {opendaylight-infra-mvn-opts}
192           # TODO: {opendaylight-infra-parallel-mvn-opts}?
193           java-opts:
194             - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
195           settings: integration-settings
196           settings-type: cfp
197           global-settings: global-settings
198           global-settings-type: cfp
199       - maven-target:
200           maven-version: mvn33
201           pom: distribution/pom.xml
202           goals: |
203               clean install dependency:tree -DoutputFile=dependency_tree.txt
204               {opendaylight-infra-parallel-mvn-opts}
205           java-opts:
206             - '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
207           settings: integration-settings
208           settings-type: cfp
209           global-settings: global-settings
210           global-settings-type: cfp
211       - integration-upload-distribution:
212           dist-pom: distribution/pom.xml
213       - trigger-builds:
214           - project: '{csit-list}'
215             block: true
216             predefined-parameters: |
217               BUNDLE_URL=$BUNDLE_URL
218               KARAF_VERSION=$KARAF_VERSION
219
220     publishers:
221       - lf-infra-publish
222       - email-notification:
223           email-recipients: '{email-recipients}'
224           email-prefix: '[$GERRIT_PROJECT]'
225
226
227 - job-template:
228     name: 'integration-multipatch-test-{stream}'
229     # Goal: Build one or more patches and run all available system test on a distribution containing the change.
230     # Operation: This job template checks out and builds each patch provided in job parameters, creates a distribution
231     # containing these patches, and triggers the distribution test job which includes most (if not all) available
232     # CSIT jobs
233     # TODO: Move the following to appropriate readthedocs document.
234     # Recommended Sandbox usage:
235     # 0. Create this job and a CSIT job you want to run on the new .zip in Sandbox (disable timed triggers).
236     # 1. Copy the csit job name to clipboard.
237     # 2. Navigate to Sandbox page of this job.
238     # 3. Click "Configure".
239     # 4. Locate "Trigger/call builds on other projects" (under "Post Steps" tab).
240     # 5. Delete the long value of "Projects to build" field and paste the job name from clipboard (ctrl+a, ctrl+v).
241     # 6. Click "Save" button.
242     # 7. Click "Build with Parameters".
243     # yamllint disable-line rule:line-length
244     # 8. Start the job with your parameters, see https://wiki.opendaylight.org/view/Integration/Test/Running_System_Tests#Running_System_Tests_Using_Custom_Distribution_Built_From_Multiple_Patches
245     # 9. The multipatch job waits for the csit job to finish, so abort csit if you see something went wrong.
246     # 10. Navigate to Sandbox page of the csit job, click the run triggered from multipatch.
247     # 11. Click Parameters and copy the long value of BUNDLE_URL field to clipboard.
248     # 12. Run the same csit job woth different patchset or test options, or other csit jobs, with this BUNDLE_URL value
249     #     so you do not have to wait for multipatch build. Repeat step 12.
250     # 13. Currently, the .zip lasts 24 hours (?) so you may need to jump to step 2 (or 0) after some time.
251
252     project-type: freestyle
253     node: centos7-java-builder-2c-8g
254     jdk: '{jdk}'
255
256     properties:
257       - opendaylight-infra-properties:
258           build-days-to-keep: '{build-days-to-keep}'
259
260     parameters:
261       - patches-to-build-parameter:
262           patches_to_build: '$PATCHES_TO_BUILD'
263       - run-test-parameter:
264           run-test: 'false'
265       - integration-distribution-branch:
266           branch: '{branch}'
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       - integration-multipatch-builder
298       - provide-maven-settings:
299           global-settings-file: 'global-settings'
300           settings-file: 'yangtools-settings'
301       - maven-target:
302           maven-version: mvn33
303           pom: patch_tester/pom.xml
304           # TODO: Make Maven options configurable. Currently tests are not skipped, everything else is.
305           goals: |
306               clean install dependency:tree -DoutputFile=dependency_tree.txt
307               -Pq
308               -Dstream={stream}
309               -Dsft.heap.max=4g
310               {opendaylight-infra-mvn-opts}
311           # TODO: {opendaylight-infra-parallel-mvn-opts}?
312           java-opts:
313             - '-Xmx3072m -Dmaven.compile.fork=true'
314           settings: integration-settings
315           settings-type: cfp
316           global-settings: global-settings
317           global-settings-type: cfp
318       - integration-upload-distribution:
319           dist-pom: patch_tester/distribution/pom.xml
320       - conditional-step:
321           condition-kind: boolean-expression
322           condition-expression: $RUNTEST
323           steps:
324             - trigger-builds:
325                 - project: '{csit-list}'
326                   block: true
327                   predefined-parameters: |
328                     BUNDLE_URL=$BUNDLE_URL
329                     KARAF_VERSION=$KARAF_VERSION
330
331     publishers:
332       - lf-infra-publish
333       - email-notification:
334           email-recipients: '{email-recipients}'
335           email-prefix: '[int/dist]'
336
337 - job-template:
338     name: 'integration-distribution-weekly-test-trigger-{stream}'
339
340     project-type: freestyle
341     node: centos7-robot-2c-8g
342
343     properties:
344       - opendaylight-infra-properties:
345           build-days-to-keep: '{build-days-to-keep}'
346
347     parameters:
348       - integration-bundle-url:
349           bundle-url: '{bundle-url}'
350       - distribution-karaf-version:
351           karaf-version: '{karaf-version}'
352
353     triggers:
354       - timed: '{schedule-weekly}'
355
356     builders:
357       - trigger-builds:
358           - project: '{csit-weekly-list}'
359             block: true
360             predefined-parameters: |
361               BUNDLE_URL=$BUNDLE_URL
362               KARAF_VERSION=$KARAF_VERSION
363
364     publishers:
365       - email-notification:
366           email-recipients: '{email-recipients}'
367           email-prefix: '[integration]'
368
369 - job-template:
370     name: 'integration-distribution-high-frequency-test-trigger-{stream}'
371
372     project-type: freestyle
373     node: centos7-robot-2c-8g
374
375     properties:
376       - opendaylight-infra-properties:
377           build-days-to-keep: '{build-days-to-keep}'
378
379     parameters:
380       - integration-bundle-url:
381           bundle-url: '{bundle-url}'
382       - distribution-karaf-version:
383           karaf-version: '{karaf-version}'
384
385     triggers:
386       - timed: '{schedule-high-frequency}'
387
388     builders:
389       - trigger-builds:
390           - project: '{csit-high-frequency-list}'
391             block: true
392             predefined-parameters: |
393               BUNDLE_URL=$BUNDLE_URL
394               KARAF_VERSION=$KARAF_VERSION
395
396     publishers:
397       - email-notification:
398           email-recipients: '{email-recipients}'
399           email-prefix: '[integration]'
400
401 - job-template:
402     name: 'integration-update-csit-tests-{stream}'
403
404     # This job's purpose is to update csit
405     # tests to run in integration-distribution-test-{stream}
406     # by updating integration files: csit-list-{stream}.inc
407     # These files can be used as !include in int-dist-test-{stream}
408
409     ######################
410     # Default parameters #
411     ######################
412
413     git-url: '$GIT_URL/$PROJECT'
414     submodule-recursive: true
415
416     #####################
417     # Job Configuration #
418     #####################
419
420     project-type: freestyle
421     node: centos7-java-builder-2c-8g
422
423     properties:
424       - lf-infra-properties:
425           build-days-to-keep: 7
426
427     parameters:
428       - lf-infra-parameters:
429           project: releng/builder  # Hardcode as this job needs to pull releng/builder
430           stream: '{stream}'
431           branch: master  # Hardcode as releng/builder only has master
432           lftools-version: '{lftools-version}'
433       - string:
434           name: CSIT_BLACKLIST
435           default: '{csit-blacklist}'
436           description: Space separated list of jobs strings to blacklist.
437
438     scm:
439       - lf-infra-gerrit-scm:
440           jenkins-ssh-credential: '{jenkins-ssh-credential}'
441           git-url: '{git-url}'
442           refspec: '$GERRIT_REFSPEC'
443           branch: '$GERRIT_BRANCH'
444           submodule-recursive: '{submodule-recursive}'
445           choosing-strategy: default
446
447     wrappers:
448       - lf-infra-wrappers:
449           build-timeout: 10
450           jenkins-ssh-credential: '{jenkins-ssh-credential}'
451
452     triggers:
453       - reverse:
454           jobs: builder-jjb-merge
455
456     builders:
457       - shell: !include-raw-escape: update-csit-tests.sh
458       - shell: |
459           git status
460           git add jjb/integration/*.lst
461       - opendaylight-infra-push-gerrit-patch:
462           project: "releng/builder"
463           gerrit-topic: "auto-update-csit-jobs-{stream}"
464           gerrit-commit-message: "Auto Update CSIT Jobs to run for {stream}"
465
466     publishers:
467       - lf-infra-publish