Merge "Switch to using global-jjb lf-jacoco-report macro"
[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 tsdr
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: Ubuntu 16.04 - mininet-ovs-25 - 20171016-0212
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-2g
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-2g
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-8c-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     builders:
283       - wipe-org-opendaylight-repo
284       - integration-multipatch-builder
285       - provide-maven-settings:
286           global-settings-file: 'global-settings'
287           settings-file: 'yangtools-settings'
288       - maven-target:
289           maven-version: mvn33
290           pom: patch_tester/pom.xml
291           # TODO: Make Maven options configurable. Currently tests are not skipped, everything else is.
292           goals: |
293               clean install dependency:tree -DoutputFile=dependency_tree.txt
294               -Pq
295               -Dstream={stream}
296               -Dsft.heap.max=4g
297               {opendaylight-infra-mvn-opts}
298           # TODO: {opendaylight-infra-parallel-mvn-opts}?
299           java-opts:
300             - '-Xmx3072m -Dmaven.compile.fork=true'
301           settings: integration-settings
302           settings-type: cfp
303           global-settings: global-settings
304           global-settings-type: cfp
305       - integration-upload-distribution:
306           dist-pom: patch_tester/distribution/pom.xml
307       - conditional-step:
308           condition-kind: boolean-expression
309           condition-expression: $RUNTEST
310           steps:
311             - trigger-builds:
312                 - project: '{csit-list}'
313                   block: true
314                   predefined-parameters: |
315                     BUNDLE_URL=$BUNDLE_URL
316                     KARAF_VERSION=$KARAF_VERSION
317
318     publishers:
319       - lf-infra-publish
320       - email-notification:
321           email-recipients: '{email-recipients}'
322           email-prefix: '[int/dist]'
323
324 - job-template:
325     name: 'integration-distribution-weekly-test-trigger-{stream}'
326
327     project-type: freestyle
328     node: centos7-robot-2c-2g
329
330     properties:
331       - opendaylight-infra-properties:
332           build-days-to-keep: '{build-days-to-keep}'
333
334     parameters:
335       - integration-bundle-url:
336           bundle-url: '{bundle-url}'
337       - distribution-karaf-version:
338           karaf-version: '{karaf-version}'
339
340     triggers:
341       - timed: '{schedule-weekly}'
342
343     builders:
344       - trigger-builds:
345           - project: '{csit-weekly-list}'
346             block: true
347             predefined-parameters: |
348               BUNDLE_URL=$BUNDLE_URL
349               KARAF_VERSION=$KARAF_VERSION
350
351     publishers:
352       - email-notification:
353           email-recipients: '{email-recipients}'
354           email-prefix: '[integration]'
355
356 - job-template:
357     name: 'integration-distribution-high-frequency-test-trigger-{stream}'
358
359     project-type: freestyle
360     node: centos7-robot-2c-2g
361
362     properties:
363       - opendaylight-infra-properties:
364           build-days-to-keep: '{build-days-to-keep}'
365
366     parameters:
367       - integration-bundle-url:
368           bundle-url: '{bundle-url}'
369       - distribution-karaf-version:
370           karaf-version: '{karaf-version}'
371
372     triggers:
373       - timed: '{schedule-high-frequency}'
374
375     builders:
376       - trigger-builds:
377           - project: '{csit-high-frequency-list}'
378             block: true
379             predefined-parameters: |
380               BUNDLE_URL=$BUNDLE_URL
381               KARAF_VERSION=$KARAF_VERSION
382
383     publishers:
384       - email-notification:
385           email-recipients: '{email-recipients}'
386           email-prefix: '[integration]'
387
388 - job-template:
389     name: 'integration-update-csit-tests-{stream}'
390
391     # This job's purpose is to update csit
392     # tests to run in integration-distribution-test-{stream}
393     # by updating integration files: csit-list-{stream}.inc
394     # These files can be used as !include in int-dist-test-{stream}
395
396     ######################
397     # Default parameters #
398     ######################
399
400     git-url: '$GIT_URL/$PROJECT'
401     submodule-recursive: true
402
403     #####################
404     # Job Configuration #
405     #####################
406
407     project-type: freestyle
408     node: centos7-java-builder-2c-4g
409
410     properties:
411       - lf-infra-properties:
412           build-days-to-keep: 7
413
414     parameters:
415       - lf-infra-parameters:
416           project: releng/builder  # Hardcode as this job needs to pull releng/builder
417           stream: '{stream}'
418           branch: master  # Hardcode as releng/builder only has master
419           lftools-version: '{lftools-version}'
420       - string:
421           name: CSIT_BLACKLIST
422           default: '{csit-blacklist}'
423           description: Space separated list of jobs strings to blacklist.
424
425     scm:
426       - lf-infra-gerrit-scm:
427           jenkins-ssh-credential: '{jenkins-ssh-credential}'
428           git-url: '{git-url}'
429           refspec: '$GERRIT_REFSPEC'
430           branch: '$GERRIT_BRANCH'
431           submodule-recursive: '{submodule-recursive}'
432           choosing-strategy: default
433
434     wrappers:
435       - lf-infra-wrappers:
436           build-timeout: 10
437           jenkins-ssh-credential: '{jenkins-ssh-credential}'
438
439     triggers:
440       - reverse:
441           jobs: builder-jjb-merge
442
443     builders:
444       - shell: !include-raw-escape: update-csit-tests.sh
445       - shell: |
446           git status
447           git add jjb/integration/*.lst
448       - opendaylight-infra-push-gerrit-patch:
449           project: "releng/builder"
450           gerrit-topic: "auto-update-csit-jobs-{stream}"
451           gerrit-commit-message: "Auto Update CSIT Jobs to run for {stream}"
452
453     publishers:
454       - lf-infra-publish