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