98e9102433d5fbdf6d7709c65fd495caf88b28f1
[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-csit-verify-1node-library'
10       - 'integration-distribution-test-{stream}'
11       - 'integration-sanity-test-{stream}'
12       - 'integration-patch-test-{stream}'
13       - 'integration-multipatch-test-{stream}'
14       - 'integration-distribution-weekly-test-trigger-{stream}'
15       - 'integration-distribution-high-frequency-test-trigger-{stream}'
16       - 'integration-update-csit-tests-{stream}'
17
18     # CSIT Lists in releng-defaults.yaml
19     stream:
20       - oxygen:
21           branch: 'master'
22           jdk: 'openjdk8'
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           jre: 'openjdk8'
32           csit-blacklist: longevity gate sanity capwap centinel coe didm iotdm jsonrpc lacp netide tsdr
33           csit-list: !include: csit-jobs-nitrogen.lst
34           csit-sanity-list: '{csit-sanity-list-nitrogen}'
35           csit-weekly-list: '{csit-weekly-list-nitrogen}'
36           csit-high-frequency-list: '{csit-high-frequency-list-nitrogen}'
37
38       - carbon:
39           branch: 'stable/carbon'
40           karaf-version: karaf3
41           jdk: 'openjdk8'
42           jre: 'openjdk8'
43           csit-blacklist: longevity gate sanity capwap centinel coe jsonrpc
44           csit-list: !include: csit-jobs-carbon.lst
45           csit-sanity-list: '{csit-sanity-list-carbon}'
46           csit-weekly-list: '{csit-weekly-list-carbon}'
47           csit-high-frequency-list: '{csit-high-frequency-list-carbon}'
48
49       - boron:
50           branch: 'stable/boron'
51           karaf-version: karaf3
52           jdk: 'openjdk8'
53           jre: 'openjdk8'
54           csit-blacklist: longevity gate sanity jsonrpc
55           csit-list: !include: csit-jobs-boron.lst
56           csit-sanity-list: '{csit-sanity-list-boron}'
57           csit-weekly-list: '{csit-weekly-list-boron}'
58           csit-high-frequency-list: ''
59           schedule-high-frequency: ''
60
61     # tools system image
62     tools_system_image: Ubuntu 16.04 - mininet-ovs-25 - 20170808-0158
63
64 # Template: integration-csit-verify-1node-library
65 # Goal: Verify changes in csit folder not covered by projects suite verify jobs (e.g. libraries or variables)
66 # Operation: This job template performs a base openflow test when there is a change in the libraries folder
67
68 - job-template:
69     name: 'integration-csit-verify-1node-library'
70
71     project-type: freestyle
72     node: centos7-robot-2c-2g
73
74     # {stream} is already defined as a composite object, it cannot be overriden.
75     dist-stream: boron
76     # This is not a template, so define branch, scope and jre for distribution to test with.
77     branch: stable/boron
78     scope: only
79     jre: openjdk8
80
81     properties:
82       - opendaylight-infra-properties:
83           build-days-to-keep: '{build-days-to-keep}'
84
85     parameters:
86       - opendaylight-infra-parameters:
87           os-cloud: '{os-cloud}'
88           project: '{project}'
89           branch: '{test-branch}'
90           refspec: 'refs/heads/{test-branch}'
91           artifacts: '{archive-artifacts}'
92       - integration-distribution-branch:
93           branch: '{verify-branch}'
94       - integration-distribution-stream:
95           stream: '{verify-stream}'
96       - integration-bundle-url:
97           bundle-url: '{bundle-url}'
98       - integration-controller-scope:
99           controller-scope: '{scope}'
100       - integration-controller-features:
101           controller-features: >
102               odl-clustering-test-app,
103               odl-openflowplugin-flow-services-ui,
104               odl-openflowplugin-app-table-miss-enforcer,
105               odl-bgpcep-pcep,
106               odl-bgpcep-bgp,
107               odl-netconf-connector-all
108       # when upgrading to carbon you should replace odl-netconf-connector-all with odl-netconf-topology
109       # and change USE_NETCONF_CONNECTOR to False in test-options
110       - integration-test-options:
111           test-options: '-v TIMEOUT_BUG_4220:10s -v USE_NETCONF_CONNECTOR:True'
112       - integration-stream-test-plan:
113           stream-test-plan: 'test-libraries-{verify-stream}.txt'
114       - integration-test-plan:
115           test-plan: 'test-libraries.txt'
116       - integration-patch-refspec:
117           branch: '$GERRIT_REFSPEC'
118       - integration-jdk-version:
119           jdkversion: '{jre}'
120       - distribution-karaf-version:
121           karaf-version: '{verify-karaf-version}'
122
123     scm:
124       - integration-gerrit-scm:
125           basedir: 'test'
126           refspec: '$PATCHREFSPEC'
127           branch: '{test-branch}'
128
129     wrappers:
130       - opendaylight-infra-wrappers:
131           build-timeout: '{build-timeout}'
132
133     triggers:
134       - integration-trigger-patch-submitted:
135           server: '{server-name}'
136           project: '{project}'
137           branch: '{test-branch}'
138           files: 'csit/libraries/*'
139
140     builders:
141       - integration-infra-stack:
142           stack-template: '{stack-template}'
143           vm_0_count: '1'
144           vm_0_flavor: '{odl_system_flavor}'
145           vm_0_image: '{odl_system_image}'
146           vm_1_count: '{tools_system_count}'
147           vm_1_flavor: '{tools_system_flavor}'
148           vm_1_image: '{tools_system_image}'
149       - integration-install-robotframework
150       - inject:
151           properties-file: 'env.properties'
152       - integration-get-slave-addresses
153       - inject:
154           properties-file: 'slave_addresses.txt'
155       - integration-detect-variables
156       - integration-deploy-controller-run-test
157       - integration-cleanup-tmp
158
159     publishers:
160       - integration-robot:
161           unstable-if: 0.0
162           pass-if: 100.0
163       - email-notification:
164           email-recipients: '{email-recipients}'
165           email-prefix: '[integration]'
166       - integration-csit-archive-build
167       - lf-infra-publish
168
169 # Template: integration-distribution-test-{stream}
170 # Goal: Verify a distribution through all system test available
171 # Operation: This template takes a distribution and passes all available system test
172
173 - job-template:
174     name: 'integration-distribution-test-{stream}'
175
176     project-type: freestyle
177     node: centos7-robot-2c-2g
178
179     properties:
180       - opendaylight-infra-properties:
181           build-days-to-keep: '{build-days-to-keep}'
182
183     parameters:
184       - integration-bundle-url:
185           bundle-url: '{bundle-url}'
186       - distribution-karaf-version:
187           karaf-version: '{karaf-version}'
188
189     builders:
190       - trigger-builds:
191           - project: '{csit-list}'
192             block: true
193             predefined-parameters: |
194               BUNDLE_URL=$BUNDLE_URL
195               KARAF_VERSION=$KARAF_VERSION
196
197     publishers:
198       - opendaylight-infra-generate-csit-status-report
199       - email-notification:
200           email-recipients: '{email-recipients}'
201           email-prefix: '[integration]'
202       - lf-infra-publish
203
204 # Template: integration-sanity-test-{stream}
205 # Goal: Verify a distribution through sanity test
206 # Operation: This template takes a distribution and passes sanity test
207
208 - job-template:
209     name: 'integration-sanity-test-{stream}'
210
211     project-type: freestyle
212     node: centos7-robot-2c-2g
213
214     properties:
215       - opendaylight-infra-properties:
216           build-days-to-keep: '{build-days-to-keep}'
217
218     parameters:
219       - integration-bundle-url:
220           bundle-url: '{bundle-url}'
221       - distribution-karaf-version:
222           karaf-version: '{karaf-version}'
223
224     builders:
225       - trigger-builds:
226           - project: '{csit-sanity-list}'
227             block: true
228             predefined-parameters: |
229               BUNDLE_URL=$BUNDLE_URL
230               KARAF_VERSION=$KARAF_VERSION
231
232     publishers:
233       - email-notification:
234           email-recipients: '{email-recipients}'
235           email-prefix: '[integration]'
236
237 # Template: integration-patch-test-{stream}
238 # Goal: Build a patch and run all available system test on a distribution containing the change
239 # Operation: This job template builds a patch, creates a distribution containing the patch, and
240 # triggers the distribution test when test-integration is used in gerrit comments
241
242 - job-template:
243     name: 'integration-patch-test-{stream}'
244
245     project-type: freestyle
246     node: centos7-java-builder-2c-8g
247
248     properties:
249       - opendaylight-infra-properties:
250           build-days-to-keep: '{build-days-to-keep}'
251
252     parameters:
253       - opendaylight-infra-parameters:
254           os-cloud: '{os-cloud}'
255           project: '$GERRIT_PROJECT'
256           branch: '{branch}'
257           refspec: '$GERRIT_REFSPEC'
258           artifacts: '{archive-artifacts}'
259       - integration-distribution-branch:
260           branch: '{branch}'
261       - distribution-karaf-version:
262           karaf-version: '{karaf-version}'
263       - integration-distribution-git-url:
264           git-url: '{git-url}'
265       - maven-exec:
266           maven-version: mvn33
267
268     scm:
269       - integration-gerrit-scm:
270           basedir: '$GERRIT_PROJECT'
271           refspec: '$GERRIT_REFSPEC'
272           branch: '{branch}'
273       - integration-distribution-scm:
274           branch: '{branch}'
275
276     wrappers:
277       - opendaylight-infra-wrappers:
278           build-timeout: '720'
279
280     triggers:
281       - gerrit:
282           server-name: '{server-name}'
283           trigger-on:
284             - comment-added-contains-event:
285                 comment-contains-value: 'test-integration'
286           projects:
287             - project-compare-type: 'ANT'
288               project-pattern: '**'
289               branches:
290                 - branch-compare-type: 'ANT'
291                   branch-pattern: '**/{branch}'
292           skip-vote:
293             successful: true
294             failed: true
295             unstable: true
296             notbuilt: true
297
298     builders:
299       - integration-rebase-gerrit-patch
300       - wipe-org-opendaylight-repo
301       - provide-maven-settings:
302           global-settings-file: 'global-settings'
303           settings-file: 'integration-settings'
304       - maven-target:
305           maven-version: 'mvn33'
306           pom: '$GERRIT_PROJECT/pom.xml'
307           goals: |
308               clean install dependency:tree -DoutputFile=dependency_tree.txt
309               -Pq
310               -Dstream={stream}
311               {opendaylight-infra-mvn-opts}
312           java-opts:
313             - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
314           settings: integration-settings
315           settings-type: cfp
316           global-settings: global-settings
317           global-settings-type: cfp
318       - maven-target:
319           maven-version: mvn33
320           pom: distribution/pom.xml
321           goals: |
322               clean install dependency:tree -DoutputFile=dependency_tree.txt
323               {opendaylight-infra-mvn-opts}
324           java-opts:
325             - '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
326           settings: integration-settings
327           settings-type: cfp
328           global-settings: global-settings
329           global-settings-type: cfp
330       - integration-upload-distribution:
331           dist-pom: distribution/pom.xml
332       - trigger-builds:
333           - project: '{csit-list}'
334             block: true
335             predefined-parameters: |
336               BUNDLE_URL=$BUNDLE_URL
337               KARAF_VERSION=$KARAF_VERSION
338
339     publishers:
340       - lf-infra-publish
341       - email-notification:
342           email-recipients: '{email-recipients}'
343           email-prefix: '[$GERRIT_PROJECT]'
344
345
346 - job-template:
347     name: 'integration-multipatch-test-{stream}'
348     # Goal: Build one or more patches and run all available system test on a distribution containing the change.
349     # Operation: This job template checks out and builds each patch provided in job parameters, creates a distribution
350     # containing these patches, and triggers the distribution test job which includes most (if not all) available
351     # CSIT jobs
352     # TODO: Move the following to appropriate readthedocs document.
353     # Recommended Sandbox usage:
354     # 0. Create this job and a CSIT job you want to run on the new .zip in Sandbox (disable timed triggers).
355     # 1. Copy the csit job name to clipboard.
356     # 2. Navigate to Sandbox page of this job.
357     # 3. Click "Configure".
358     # 4. Locate "Trigger/call builds on other projects" (under "Post Steps" tab).
359     # 5. Delete the long value of "Projects to build" field and paste the job name from clipboard (ctrl+a, ctrl+v).
360     # 6. Click "Save" button.
361     # 7. Click "Build with Parameters".
362     # yamllint disable-line rule:line-length
363     # 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
364     # 9. The multipatch job waits for the csit job to finish, so abort csit if you see something went wrong.
365     # 10. Navigate to Sandbox page of the csit job, click the run triggered from multipatch.
366     # 11. Click Parameters and copy the long value of BUNDLE_URL field to clipboard.
367     # 12. Run the same csit job woth different patchset or test options, or other csit jobs, with this BUNDLE_URL value
368     #     so you do not have to wait for multipatch build. Repeat step 12.
369     # 13. Currently, the .zip lasts 24 hours (?) so you may need to jump to step 2 (or 0) after some time.
370
371     project-type: freestyle
372     node: centos7-java-builder-8c-8g
373     jdk: '{jdk}'
374
375     properties:
376       - opendaylight-infra-properties:
377           build-days-to-keep: '{build-days-to-keep}'
378
379     parameters:
380       - patches-to-build-parameter:
381           patches_to_build: '$PATCHES_TO_BUILD'
382       - run-test-parameter:
383           run-test: 'false'
384       - integration-distribution-branch:
385           branch: '{branch}'
386       - distribution-karaf-version:
387           karaf-version: '{karaf-version}'
388       - opendaylight-infra-parameters:
389           os-cloud: '{os-cloud}'
390           project: 'integration/distribution'
391           branch: '{branch}'
392           refspec: 'refs/heads/{branch}'
393           artifacts: '{archive-artifacts}'
394       - maven-exec:
395           maven-version: mvn33
396
397     wrappers:
398       - opendaylight-infra-wrappers:
399           build-timeout: '1200'
400
401     builders:
402       - wipe-org-opendaylight-repo
403       - integration-multipatch-builder
404       - provide-maven-settings:
405           global-settings-file: 'global-settings'
406           settings-file: 'yangtools-settings'
407       - maven-target:
408           maven-version: mvn33
409           pom: patch_tester/pom.xml
410           # TODO: Make Maven options configurable. Currently tests are not skipped, everything else is.
411           goals: |
412               clean install dependency:tree -DoutputFile=dependency_tree.txt
413               -Pq
414               -Dstream={stream}
415               -Dsft.heap.max=4g
416               {opendaylight-infra-mvn-opts}
417           java-opts:
418             - '-Xmx3072m -Dmaven.compile.fork=true'
419           settings: integration-settings
420           settings-type: cfp
421           global-settings: global-settings
422           global-settings-type: cfp
423       - integration-upload-distribution:
424           dist-pom: patch_tester/distribution/pom.xml
425       - conditional-step:
426           condition-kind: boolean-expression
427           condition-expression: $RUNTEST
428           steps:
429             - trigger-builds:
430                 - project: '{csit-list}'
431                   block: true
432                   predefined-parameters: |
433                     BUNDLE_URL=$BUNDLE_URL
434                     KARAF_VERSION=$KARAF_VERSION
435
436     publishers:
437       - lf-infra-publish
438       - email-notification:
439           email-recipients: '{email-recipients}'
440           email-prefix: '[int/dist]'
441
442 - job-template:
443     name: 'integration-distribution-weekly-test-trigger-{stream}'
444
445     project-type: freestyle
446     node: centos7-robot-2c-2g
447
448     properties:
449       - opendaylight-infra-properties:
450           build-days-to-keep: '{build-days-to-keep}'
451
452     parameters:
453       - integration-bundle-url:
454           bundle-url: '{bundle-url}'
455       - distribution-karaf-version:
456           karaf-version: '{karaf-version}'
457
458     triggers:
459       - timed: '{schedule-weekly}'
460
461     builders:
462       - trigger-builds:
463           - project: '{csit-weekly-list}'
464             block: true
465             predefined-parameters: |
466               BUNDLE_URL=$BUNDLE_URL
467               KARAF_VERSION=$KARAF_VERSION
468
469     publishers:
470       - email-notification:
471           email-recipients: '{email-recipients}'
472           email-prefix: '[integration]'
473
474 - job-template:
475     name: 'integration-distribution-high-frequency-test-trigger-{stream}'
476
477     project-type: freestyle
478     node: centos7-robot-2c-2g
479
480     properties:
481       - opendaylight-infra-properties:
482           build-days-to-keep: '{build-days-to-keep}'
483
484     parameters:
485       - integration-bundle-url:
486           bundle-url: '{bundle-url}'
487       - distribution-karaf-version:
488           karaf-version: '{karaf-version}'
489
490     triggers:
491       - timed: '{schedule-high-frequency}'
492
493     builders:
494       - trigger-builds:
495           - project: '{csit-high-frequency-list}'
496             block: true
497             predefined-parameters: |
498               BUNDLE_URL=$BUNDLE_URL
499               KARAF_VERSION=$KARAF_VERSION
500
501     publishers:
502       - email-notification:
503           email-recipients: '{email-recipients}'
504           email-prefix: '[integration]'
505
506 - job-template:
507     name: 'integration-update-csit-tests-{stream}'
508
509     # This job's purpose is to update csit
510     # tests to run in integration-distribution-test-{stream}
511     # by updating integration files: csit-list-carbon.inc,
512     # csit-list-boron.inc, csit-list-beryllium.inc
513     # These files can be used as !include in int-dist-test-{stream}
514
515     ######################
516     # Default parameters #
517     ######################
518
519     git-url: '$GIT_URL/$PROJECT'
520     submodule-recursive: true
521
522     #####################
523     # Job Configuration #
524     #####################
525
526     project-type: freestyle
527     node: centos7-java-builder-2c-4g
528
529     properties:
530       - lf-infra-properties:
531           build-days-to-keep: 7
532
533     parameters:
534       - lf-infra-parameters:
535           project: releng/builder  # Hardcode as this job needs to pull releng/builder
536           stream: '{stream}'
537           branch: master  # Hardcode as releng/builder only has master
538           lftools-version: '{lftools-version}'
539       - string:
540           name: CSIT_BLACKLIST
541           default: '{csit-blacklist}'
542           description: Space separated list of jobs strings to blacklist.
543
544     scm:
545       - lf-infra-gerrit-scm:
546           jenkins-ssh-credential: '{jenkins-ssh-credential}'
547           git-url: '{git-url}'
548           refspec: '$GERRIT_REFSPEC'
549           branch: '$GERRIT_BRANCH'
550           submodule-recursive: '{submodule-recursive}'
551           choosing-strategy: default
552
553     wrappers:
554       - lf-infra-wrappers:
555           build-timeout: 10
556           jenkins-ssh-credential: '{jenkins-ssh-credential}'
557
558     triggers:
559       - reverse:
560           jobs: builder-jjb-merge
561
562     builders:
563       - shell: !include-raw-escape: update-csit-tests.sh
564       - shell: |
565           git status
566           git add jjb/integration/*.lst
567       - opendaylight-infra-push-gerrit-patch:
568           project: "releng/builder"
569           gerrit-topic: "auto-update-csit-jobs-{stream}"
570           gerrit-commit-message: "Auto Update CSIT Jobs to run for {stream}"
571
572     publishers:
573       - lf-infra-publish