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