Merge "List dependency graph in validate-autorelease"
[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       - '{project-name}-verify-tox-master'
9       - 'integration-distribution-test-{stream}'
10       - 'integration-sanity-test-{stream}'
11       - 'integration-patch-test-{stream}'
12       - 'integration-multipatch-test-{stream}'
13       - 'integration-distribution-weekly-test-trigger-{stream}'
14       - 'integration-distribution-high-frequency-test-trigger-{stream}'
15       - 'integration-update-csit-tests-{stream}'
16
17     # CSIT Lists in releng-defaults.yaml
18     stream:
19       - oxygen:
20           branch: 'master'
21           csit-blacklist: longevity gate sanity capwap centinel coe didm iotdm jsonrpc lacp netide tsdr
22           csit-list: !include: csit-jobs-oxygen.lst
23           csit-sanity-list: '{csit-sanity-list-oxygen}'
24           csit-weekly-list: '{csit-weekly-list-oxygen}'
25           csit-high-frequency-list: '{csit-high-frequency-list-oxygen}'
26
27       - nitrogen:
28           branch: 'stable/nitrogen'
29           csit-blacklist: longevity gate sanity capwap centinel coe didm iotdm jsonrpc lacp netide tsdr
30           csit-list: !include: csit-jobs-nitrogen.lst
31           csit-sanity-list: '{csit-sanity-list-nitrogen}'
32           csit-weekly-list: '{csit-weekly-list-nitrogen}'
33           csit-high-frequency-list: '{csit-high-frequency-list-nitrogen}'
34
35       - carbon:
36           branch: 'stable/carbon'
37           karaf-version: karaf3
38           csit-blacklist: longevity gate sanity capwap centinel coe jsonrpc
39           csit-list: !include: csit-jobs-carbon.lst
40           csit-sanity-list: '{csit-sanity-list-carbon}'
41           csit-weekly-list: '{csit-weekly-list-carbon}'
42           csit-high-frequency-list: '{csit-high-frequency-list-carbon}'
43
44     # tools system image
45     tools_system_image: Ubuntu 16.04 - mininet-ovs-25 - 20171016-0212
46
47 # Template: integration-distribution-test-{stream}
48 # Goal: Verify a distribution through all system test available
49 # Operation: This template takes a distribution and passes all available system test
50
51 - job-template:
52     name: 'integration-distribution-test-{stream}'
53
54     project-type: freestyle
55     node: centos7-robot-2c-2g
56
57     properties:
58       - opendaylight-infra-properties:
59           build-days-to-keep: '{build-days-to-keep}'
60
61     parameters:
62       - integration-bundle-url:
63           bundle-url: '{bundle-url}'
64       - distribution-karaf-version:
65           karaf-version: '{karaf-version}'
66
67     builders:
68       - trigger-builds:
69           - project: '{csit-list}'
70             block: true
71             predefined-parameters: |
72               BUNDLE_URL=$BUNDLE_URL
73               KARAF_VERSION=$KARAF_VERSION
74
75     publishers:
76       - opendaylight-infra-generate-csit-status-report
77       - email-notification:
78           email-recipients: '{email-recipients}'
79           email-prefix: '[integration]'
80       - lf-infra-publish
81
82 # Template: integration-sanity-test-{stream}
83 # Goal: Verify a distribution through sanity test
84 # Operation: This template takes a distribution and passes sanity test
85
86 - job-template:
87     name: 'integration-sanity-test-{stream}'
88
89     project-type: freestyle
90     node: centos7-robot-2c-2g
91
92     properties:
93       - opendaylight-infra-properties:
94           build-days-to-keep: '{build-days-to-keep}'
95
96     parameters:
97       - integration-bundle-url:
98           bundle-url: '{bundle-url}'
99       - distribution-karaf-version:
100           karaf-version: '{karaf-version}'
101
102     builders:
103       - trigger-builds:
104           - project: '{csit-sanity-list}'
105             block: true
106             predefined-parameters: |
107               BUNDLE_URL=$BUNDLE_URL
108               KARAF_VERSION=$KARAF_VERSION
109
110     publishers:
111       - email-notification:
112           email-recipients: '{email-recipients}'
113           email-prefix: '[integration]'
114
115 # Template: integration-patch-test-{stream}
116 # Goal: Build a patch and run all available system test on a distribution containing the change
117 # Operation: This job template builds a patch, creates a distribution containing the patch, and
118 # triggers the distribution test when test-integration is used in gerrit comments
119
120 - job-template:
121     name: 'integration-patch-test-{stream}'
122
123     project-type: freestyle
124     node: centos7-java-builder-2c-8g
125
126     properties:
127       - opendaylight-infra-properties:
128           build-days-to-keep: '{build-days-to-keep}'
129
130     parameters:
131       - opendaylight-infra-parameters:
132           os-cloud: '{os-cloud}'
133           project: '$GERRIT_PROJECT'
134           branch: '{branch}'
135           refspec: '$GERRIT_REFSPEC'
136           artifacts: '{archive-artifacts}'
137       - integration-distribution-branch:
138           branch: '{branch}'
139       - distribution-karaf-version:
140           karaf-version: '{karaf-version}'
141       - integration-distribution-git-url:
142           git-url: '{git-url}'
143       - maven-exec:
144           maven-version: mvn33
145
146     scm:
147       - integration-gerrit-scm:
148           basedir: '$GERRIT_PROJECT'
149           refspec: '$GERRIT_REFSPEC'
150           branch: '{branch}'
151       - integration-distribution-scm:
152           branch: '{branch}'
153
154     wrappers:
155       - opendaylight-infra-wrappers:
156           build-timeout: '720'
157
158     triggers:
159       - gerrit:
160           server-name: '{server-name}'
161           trigger-on:
162             - comment-added-contains-event:
163                 comment-contains-value: 'test-integration'
164           projects:
165             - project-compare-type: 'ANT'
166               project-pattern: '**'
167               branches:
168                 - branch-compare-type: 'ANT'
169                   branch-pattern: '**/{branch}'
170           skip-vote:
171             successful: true
172             failed: true
173             unstable: true
174             notbuilt: true
175
176     builders:
177       - integration-rebase-gerrit-patch
178       - wipe-org-opendaylight-repo
179       - provide-maven-settings:
180           global-settings-file: 'global-settings'
181           settings-file: 'integration-settings'
182       - maven-target:
183           maven-version: 'mvn33'
184           pom: '$GERRIT_PROJECT/pom.xml'
185           goals: |
186               clean install dependency:tree -DoutputFile=dependency_tree.txt
187               -Pq
188               -Dstream={stream}
189               {opendaylight-infra-mvn-opts}
190           # TODO: {opendaylight-infra-parallel-mvn-opts}?
191           java-opts:
192             - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
193           settings: integration-settings
194           settings-type: cfp
195           global-settings: global-settings
196           global-settings-type: cfp
197       - maven-target:
198           maven-version: mvn33
199           pom: distribution/pom.xml
200           goals: |
201               clean install dependency:tree -DoutputFile=dependency_tree.txt
202               {opendaylight-infra-parallel-mvn-opts}
203           java-opts:
204             - '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
205           settings: integration-settings
206           settings-type: cfp
207           global-settings: global-settings
208           global-settings-type: cfp
209       - integration-upload-distribution:
210           dist-pom: distribution/pom.xml
211       - trigger-builds:
212           - project: '{csit-list}'
213             block: true
214             predefined-parameters: |
215               BUNDLE_URL=$BUNDLE_URL
216               KARAF_VERSION=$KARAF_VERSION
217
218     publishers:
219       - lf-infra-publish
220       - email-notification:
221           email-recipients: '{email-recipients}'
222           email-prefix: '[$GERRIT_PROJECT]'
223
224
225 - job-template:
226     name: 'integration-multipatch-test-{stream}'
227     # Goal: Build one or more patches and run all available system test on a distribution containing the change.
228     # Operation: This job template checks out and builds each patch provided in job parameters, creates a distribution
229     # containing these patches, and triggers the distribution test job which includes most (if not all) available
230     # CSIT jobs
231     # TODO: Move the following to appropriate readthedocs document.
232     # Recommended Sandbox usage:
233     # 0. Create this job and a CSIT job you want to run on the new .zip in Sandbox (disable timed triggers).
234     # 1. Copy the csit job name to clipboard.
235     # 2. Navigate to Sandbox page of this job.
236     # 3. Click "Configure".
237     # 4. Locate "Trigger/call builds on other projects" (under "Post Steps" tab).
238     # 5. Delete the long value of "Projects to build" field and paste the job name from clipboard (ctrl+a, ctrl+v).
239     # 6. Click "Save" button.
240     # 7. Click "Build with Parameters".
241     # yamllint disable-line rule:line-length
242     # 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
243     # 9. The multipatch job waits for the csit job to finish, so abort csit if you see something went wrong.
244     # 10. Navigate to Sandbox page of the csit job, click the run triggered from multipatch.
245     # 11. Click Parameters and copy the long value of BUNDLE_URL field to clipboard.
246     # 12. Run the same csit job woth different patchset or test options, or other csit jobs, with this BUNDLE_URL value
247     #     so you do not have to wait for multipatch build. Repeat step 12.
248     # 13. Currently, the .zip lasts 24 hours (?) so you may need to jump to step 2 (or 0) after some time.
249
250     project-type: freestyle
251     node: centos7-java-builder-8c-8g
252     jdk: '{jdk}'
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       - distribution-karaf-version:
266           karaf-version: '{karaf-version}'
267       - opendaylight-infra-parameters:
268           os-cloud: '{os-cloud}'
269           project: 'integration/distribution'
270           branch: '{branch}'
271           refspec: 'refs/heads/{branch}'
272           artifacts: '{archive-artifacts}'
273       - maven-exec:
274           maven-version: mvn33
275
276     wrappers:
277       - opendaylight-infra-wrappers:
278           build-timeout: '1200'
279
280     builders:
281       - wipe-org-opendaylight-repo
282       - integration-multipatch-builder
283       - provide-maven-settings:
284           global-settings-file: 'global-settings'
285           settings-file: 'yangtools-settings'
286       - maven-target:
287           maven-version: mvn33
288           pom: patch_tester/pom.xml
289           # TODO: Make Maven options configurable. Currently tests are not skipped, everything else is.
290           goals: |
291               clean install dependency:tree -DoutputFile=dependency_tree.txt
292               -Pq
293               -Dstream={stream}
294               -Dsft.heap.max=4g
295               {opendaylight-infra-mvn-opts}
296           # TODO: {opendaylight-infra-parallel-mvn-opts}?
297           java-opts:
298             - '-Xmx3072m -Dmaven.compile.fork=true'
299           settings: integration-settings
300           settings-type: cfp
301           global-settings: global-settings
302           global-settings-type: cfp
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-2g
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-2g
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-java-builder-2c-4g
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