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