Merge "Handle bundle-vars directly in dist-compare script"
[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: maven
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
253     scm:
254       - integration-gerrit-scm:
255           basedir: '$GERRIT_PROJECT'
256           refspec: '$GERRIT_REFSPEC'
257           branch: '{branch}'
258       - integration-distribution-scm:
259           branch: '{branch}'
260
261     wrappers:
262       - opendaylight-infra-wrappers:
263           build-timeout: '720'
264
265     triggers:
266       - gerrit:
267           server-name: '{server-name}'
268           trigger-on:
269             - comment-added-contains-event:
270                 comment-contains-value: 'test-integration'
271           projects:
272             - project-compare-type: 'ANT'
273               project-pattern: '**'
274               branches:
275                 - branch-compare-type: 'ANT'
276                   branch-pattern: '**/{branch}'
277           skip-vote:
278             successful: true
279             failed: true
280             unstable: true
281             notbuilt: true
282
283     prebuilders:
284       - integration-rebase-gerrit-patch
285       - integration-get-bundle-url
286       - inject:
287           properties-file: 'bundle.txt'
288       - wipe-org-opendaylight-repo
289       - provide-maven-settings:
290           global-settings-file: 'odl-global-settings'
291           settings-file: 'integration-settings'
292       - maven-target:
293           maven-version: 'mvn33'
294           pom: '$GERRIT_PROJECT/pom.xml'
295           goals: >
296               clean install dependency:tree -DoutputFile=dependency_tree.txt
297               -V -B -Pq -Djenkins
298               -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
299               -Dstream={stream}
300           java-opts:
301             - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
302           settings: 'integration-settings'
303           settings-type: cfp
304           global-settings: 'odl-global-settings'
305           global-settings-type: cfp
306
307     maven:
308       maven-name: 'mvn33'
309       root-pom: 'distribution/pom.xml'
310       goals: >
311           clean install dependency:tree -DoutputFile=dependency_tree.txt
312           -V -B -Djenkins
313           -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
314       maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
315       settings: 'integration-settings'
316       settings-type: cfp
317       global-settings: 'odl-global-settings'
318       global-settings-type: cfp
319       ignore-upstream-changes: true
320       post-step-run-condition: 'SUCCESS'
321
322     postbuilders:
323       - trigger-builds:
324           - project: '{csit-list}'
325             block: true
326             predefined-parameters:
327               BUNDLEURL=$BUNDLEURL
328
329     publishers:
330       - opendaylight-infra-shiplogs:
331           maven-version: 'mvn33'
332       - email-notification:
333           email-recipients: '{email-recipients}'
334           email-prefix: '[$GERRIT_PROJECT]'
335
336
337 - job-template:
338     name: 'integration-multipatch-test-{stream}'
339     # Goal: Build one or more patches and run all available system test on a distribution containing the change.
340     # Operation: This job template checks out and builds each patch provided in job parameters, creates a distribution
341     # containing these patches, and triggers the distribution test job which includes most (if not all) available
342     # CSIT jobs
343     # TODO: Move the following to appropriate readthedocs document.
344     # Recommended Sandbox usage:
345     # 0. Create this job and a CSIT job you want to run on the new .zip in Sandbox (disable timed triggers).
346     # 1. Copy the csit job name to clipboard.
347     # 2. Navigate to Sandbox page of this job.
348     # 3. Click "Configure".
349     # 4. Locate "Trigger/call builds on other projects" (under "Post Steps" tab).
350     # 5. Delete the long value of "Projects to build" field and paste the job name from clipboard (ctrl+a, ctrl+v).
351     # 6. Click "Save" button.
352     # 7. Click "Build with Parameters".
353     # yamllint disable-line rule:line-length
354     # 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
355     # 9. The multipatch job waits for the csit job to finish, so abort csit if you see something went wrong.
356     # 10. Navigate to Sandbox page of the csit job, click the run triggered from multipatch.
357     # 11. Click Parameters and copy the long value of BUNDLEURL field to clipboard.
358     # 12. Run the same csit job woth different patchset or test options, or other csit jobs, with this BUNDLEURL value
359     #     so you do not have to wait for multipatch build. Repeat step 12.
360     # 13. Currently, the .zip lasts 24 hours (?) so you may need to jump to step 2 (or 0) after some time.
361
362     project-type: maven
363     node: centos7-java-builder-8c-8g
364     jdk: '{jdk}'
365
366     properties:
367       - opendaylight-infra-properties:
368           build-days-to-keep: '{build-days-to-keep}'
369
370     parameters:
371       - patches-to-build-parameter:
372           patches_to_build: '$PATCHES_TO_BUILD'
373       - run-test-parameter:
374           run-test: 'false'
375       - integration-distribution-branch:
376           branch: '{branch}'
377       - opendaylight-infra-parameters:
378           os-cloud: '{os-cloud}'
379           project: 'integration/distribution'
380           branch: '{branch}'
381           refspec: 'refs/heads/{branch}'
382           artifacts: '{archive-artifacts} **/dependency_tree.txt'
383
384     prebuilders:
385       - wipe-org-opendaylight-repo
386       - integration-multipatch-builder
387       - inject:
388           properties-file: 'bundle.txt'
389       - provide-maven-settings:
390           global-settings-file: 'odl-global-settings'
391           settings-file: 'yangtools-settings'
392
393     wrappers:
394       - opendaylight-infra-wrappers:
395           build-timeout: '1200'
396
397     maven:
398       maven-name: 'mvn33'
399       root-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           -f patch_tester/pom.xml -V -B -Pq -Djenkins
404           -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
405           -Dstream={stream}
406       maven-opts: '-Xmx7168m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
407       settings: 'yangtools-settings'
408       settings-type: cfp
409       global-settings: 'odl-global-settings'
410       global-settings-type: cfp
411       post-step-run-condition: 'SUCCESS'
412
413     postbuilders:
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                     BUNDLEURL=$BUNDLEURL
423
424     publishers:
425       - opendaylight-infra-shiplogs:
426           maven-version: 'mvn33'
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-bundleurl:
443           bundleurl: '{bundleurl}'
444       - integration-jdk-version:
445           jdkversion: '{jre}'
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               BUNDLEURL=$BUNDLEURL
456
457     publishers:
458       - email-notification:
459           email-recipients: '{email-recipients}'
460           email-prefix: '[integration]'