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