Migrate gerrit push change to generic builder
[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       - 'integration-distribution-test-{stream}'
9       - 'integration-sanity-test-{stream}'
10       - 'integration-patch-test-{stream}'
11       - 'integration-multipatch-test-{stream}'
12       - 'integration-distribution-weekly-test-trigger-{stream}'
13       - 'integration-distribution-high-frequency-test-trigger-{stream}'
14       - 'integration-update-csit-tests-{stream}'
15       - '{project-name}-rtd-jobs':
16           build-node: centos7-builder-2c-2g
17           project-pattern: integration/test
18           rtd-build-url: https://readthedocs.org/api/v2/webhook/odl-integrationtest/32934/
19           rtd-token: 70766f97941a74ef80b84749ac4799e5ddeee99a
20       - gerrit-tox-verify:
21           branch: master
22           stream: master
23
24     # CSIT Lists in releng-defaults.yaml
25     stream:
26       - fluorine:
27           branch: 'master'
28           csit-blacklist: >
29               alto bier capwap centinel coe didm dluxapps groupbasedpolicy iotdm jsonrpc lacp
30               l2switch messaging4transport nemo netide nic ocpplugin of-config p4plugin packetcable
31               sdninterfaceapp sxp tsdr unimgr usc usecplugin vtn gate longevity sanity tdd wip
32           csit-list: !include: csit-jobs-fluorine.lst
33           csit-sanity-list: '{csit-sanity-list-fluorine}'
34           csit-weekly-list: '{csit-weekly-list-fluorine}'
35           csit-high-frequency-list: '{csit-high-frequency-list-fluorine}'
36           mvn-version: 'mvn35'
37       - oxygen:
38           branch: 'stable/oxygen'
39           csit-blacklist: >
40               capwap centinel coe didm iotdm jsonrpc lacp messaging4transport netide nic
41               ocpplugin sdninterfaceapp unimgr usecplugin gate longevity sanity tdd wip
42           csit-list: !include: csit-jobs-oxygen.lst
43           csit-sanity-list: '{csit-sanity-list-oxygen}'
44           csit-weekly-list: '{csit-weekly-list-oxygen}'
45           csit-high-frequency-list: '{csit-high-frequency-list-oxygen}'
46           mvn-version: 'mvn35'
47
48       - nitrogen:
49           branch: 'stable/nitrogen'
50           csit-blacklist: capwap centinel coe didm iotdm jsonrpc lacp netide tsdr gate longevity sanity tdd wip
51           csit-list: !include: csit-jobs-nitrogen.lst
52           csit-sanity-list: '{csit-sanity-list-nitrogen}'
53           csit-weekly-list: '{csit-weekly-list-nitrogen}'
54           csit-high-frequency-list: '{csit-high-frequency-list-nitrogen}'
55           mvn-version: 'mvn35'
56
57     # tools system image
58     tools_system_image: ZZCI - Ubuntu 16.04 - mininet-ovs-25 - 20171208-1847
59
60 # Template: integration-distribution-test-{stream}
61 # Goal: Verify a distribution through all system test available
62 # Operation: This template takes a distribution and passes all available system test
63
64 - job-template:
65     name: 'integration-distribution-test-{stream}'
66
67     project-type: freestyle
68     node: queue-disttest-2c-1g
69
70     properties:
71       - opendaylight-infra-properties:
72           build-days-to-keep: '{build-days-to-keep}'
73
74     parameters:
75       - integration-bundle-url:
76           bundle-url: '{bundle-url}'
77       - distribution-karaf-version:
78           karaf-version: '{karaf-version}'
79
80     builders:
81       - trigger-builds:
82           - project: '{csit-list}'
83             block: true
84             predefined-parameters: |
85               BUNDLE_URL=$BUNDLE_URL
86               KARAF_VERSION=$KARAF_VERSION
87
88     publishers:
89       - opendaylight-infra-generate-csit-status-report
90       - email-notification:
91           email-recipients: '{email-recipients}'
92           email-prefix: '[integration]'
93       - lf-infra-publish
94
95 # Template: integration-sanity-test-{stream}
96 # Goal: Verify a distribution through sanity test
97 # Operation: This template takes a distribution and passes sanity test
98
99 - job-template:
100     name: 'integration-sanity-test-{stream}'
101
102     project-type: freestyle
103     node: queue-intque-2c-1g
104
105     properties:
106       - opendaylight-infra-properties:
107           build-days-to-keep: '{build-days-to-keep}'
108
109     parameters:
110       - integration-bundle-url:
111           bundle-url: '{bundle-url}'
112       - distribution-karaf-version:
113           karaf-version: '{karaf-version}'
114
115     builders:
116       - trigger-builds:
117           - project: '{csit-sanity-list}'
118             block: true
119             predefined-parameters: |
120               BUNDLE_URL=$BUNDLE_URL
121               KARAF_VERSION=$KARAF_VERSION
122
123     publishers:
124       - email-notification:
125           email-recipients: '{email-recipients}'
126           email-prefix: '[integration]'
127
128 # Template: integration-patch-test-{stream}
129 # Goal: Build a patch and run all available system test on a distribution containing the change
130 # Operation: This job template builds a patch, creates a distribution containing the patch, and
131 # triggers the distribution test when test-integration is used in gerrit comments
132
133 - job-template:
134     name: 'integration-patch-test-{stream}'
135
136     project-type: freestyle
137     node: centos7-builder-2c-8g
138
139     properties:
140       - opendaylight-infra-properties:
141           build-days-to-keep: '{build-days-to-keep}'
142
143     parameters:
144       - opendaylight-infra-parameters:
145           os-cloud: '{os-cloud}'
146           project: '$GERRIT_PROJECT'
147           branch: '{branch}'
148           refspec: '$GERRIT_REFSPEC'
149           artifacts: '{archive-artifacts}'
150       - integration-distribution-branch:
151           branch: '{branch}'
152       - distribution-karaf-version:
153           karaf-version: '{karaf-version}'
154       - integration-distribution-git-url:
155           git-url: '{git-url}'
156       - maven-exec:
157           maven-version: mvn35
158
159     scm:
160       - integration-gerrit-scm:
161           basedir: '$GERRIT_PROJECT'
162           refspec: '$GERRIT_REFSPEC'
163           branch: '{branch}'
164       - integration-distribution-scm:
165           branch: '{branch}'
166
167     wrappers:
168       - opendaylight-infra-wrappers:
169           build-timeout: '720'
170
171     triggers:
172       - gerrit:
173           server-name: '{gerrit-server-name}'
174           trigger-on:
175             - comment-added-contains-event:
176                 comment-contains-value: 'test-integration'
177           projects:
178             - project-compare-type: 'ANT'
179               project-pattern: '**'
180               branches:
181                 - branch-compare-type: 'ANT'
182                   branch-pattern: '**/{branch}'
183           skip-vote:
184             successful: true
185             failed: true
186             unstable: true
187             notbuilt: true
188
189     builders:
190       - integration-rebase-gerrit-patch
191       - wipe-org-opendaylight-repo
192       - provide-maven-settings:
193           global-settings-file: 'global-settings'
194           settings-file: 'integration-settings'
195       - maven-target:
196           maven-version: 'mvn35'
197           pom: '$GERRIT_PROJECT/pom.xml'
198           goals: |
199               clean install dependency:tree -DoutputFile=dependency_tree.txt
200               -Pq
201               -Dstream={stream}
202               {opendaylight-infra-mvn-opts}
203           # {opendaylight-infra-parallel-mvn-opts} is bad when there are multiple big features in SFT.
204           java-opts:
205             - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
206           settings: integration-settings
207           settings-type: cfp
208           global-settings: global-settings
209           global-settings-type: cfp
210       - maven-target:
211           maven-version: mvn35
212           pom: distribution/pom.xml
213           goals: |
214               clean install dependency:tree -DoutputFile=dependency_tree.txt
215               {opendaylight-infra-mvn-opts}
216           # {opendaylight-infra-parallel-mvn-opts} is bad when there are multiple big features in SFT.
217           java-opts:
218             - '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
219           settings: integration-settings
220           settings-type: cfp
221           global-settings: global-settings
222           global-settings-type: cfp
223       - integration-upload-distribution:
224           dist-pom: distribution/pom.xml
225       - trigger-builds:
226           - project: '{csit-list}'
227             block: true
228             predefined-parameters: |
229               BUNDLE_URL=$BUNDLE_URL
230               KARAF_VERSION=$KARAF_VERSION
231
232     publishers:
233       - lf-infra-publish
234       - email-notification:
235           email-recipients: '{email-recipients}'
236           email-prefix: '[$GERRIT_PROJECT]'
237
238
239 - job-template:
240     name: 'integration-multipatch-test-{stream}'
241     # Goal: Build one or more patches and run all available system test on a distribution containing the change.
242     # Operation: This job template checks out and builds in order each patch provided in job parameters, finally
243     # it creates a distribution containing all patches and triggers the distribution test job which includes most
244     # (if not all) available CSIT jobs.
245
246     project-type: freestyle
247     node: centos7-builder-8c-8g
248     concurrent: true
249     jdk: '{java-version}'
250
251     properties:
252       - opendaylight-infra-properties:
253           build-days-to-keep: '{build-days-to-keep}'
254
255     parameters:
256       - patches-to-build-parameter:
257           patches_to_build: '$PATCHES_TO_BUILD'
258       - run-test-parameter:
259           run-test: 'false'
260       - build-fast-parameter:
261           build-fast: 'false'
262       - integration-distribution-branch:
263           branch: '{branch}'
264       - integration-distribution-stream:
265           stream: '{stream}'
266       - distribution-karaf-version:
267           karaf-version: '{karaf-version}'
268       - opendaylight-infra-parameters:
269           os-cloud: '{os-cloud}'
270           project: 'integration/distribution'
271           branch: '{branch}'
272           refspec: 'refs/heads/{branch}'
273           artifacts: '{archive-artifacts}'
274       - lf-infra-maven-parameters:
275           mvn-opts: ''
276           mvn-params: ''
277           mvn-version: mvn35
278           staging-profile-id: ''  # Staging repos do not make sense for this job
279
280     wrappers:
281       - opendaylight-infra-wrappers:
282           build-timeout: '1200'
283
284     triggers:
285       - gerrit:
286           server-name: '{gerrit-server-name}'
287           trigger-on:
288             - comment-added-contains-event:
289                 comment-contains-value: 'multipatch-build'
290           projects:
291             - project-compare-type: ANT
292               project-pattern: '**'
293               branches:
294                 - branch-compare-type: ANT
295                   branch-pattern: '**/{branch}'
296
297     builders:
298       - wipe-org-opendaylight-repo
299       - lf-maven-install:
300           mvn-version: '{mvn-version}'
301       - provide-maven-settings:
302           global-settings-file: 'global-settings'
303           settings-file: 'integration-distribution-settings'
304       - integration-multipatch-builder
305       - integration-upload-distribution:
306           dist-pom: patch_tester/distribution/pom.xml
307       - conditional-step:
308           condition-kind: boolean-expression
309           condition-expression: $RUN_TEST
310           steps:
311             - trigger-builds:
312                 - project: '{csit-list}'
313                   block: true
314                   predefined-parameters: |
315                     BUNDLE_URL=$BUNDLE_URL
316                     KARAF_VERSION=$KARAF_VERSION
317
318     publishers:
319       - lf-infra-publish
320       - email-notification:
321           email-recipients: '{email-recipients}'
322           email-prefix: '[int/dist]'
323
324 - job-template:
325     name: 'integration-distribution-weekly-test-trigger-{stream}'
326
327     project-type: freestyle
328     node: queue-intque-2c-1g
329
330     properties:
331       - opendaylight-infra-properties:
332           build-days-to-keep: '{build-days-to-keep}'
333
334     parameters:
335       - integration-bundle-url:
336           bundle-url: '{bundle-url}'
337       - distribution-karaf-version:
338           karaf-version: '{karaf-version}'
339
340     triggers:
341       - timed: '{schedule-weekly}'
342
343     builders:
344       - trigger-builds:
345           - project: '{csit-weekly-list}'
346             block: true
347             predefined-parameters: |
348               BUNDLE_URL=$BUNDLE_URL
349               KARAF_VERSION=$KARAF_VERSION
350
351     publishers:
352       - email-notification:
353           email-recipients: '{email-recipients}'
354           email-prefix: '[integration]'
355
356 - job-template:
357     name: 'integration-distribution-high-frequency-test-trigger-{stream}'
358
359     project-type: freestyle
360     node: queue-intque-2c-1g
361
362     properties:
363       - opendaylight-infra-properties:
364           build-days-to-keep: '{build-days-to-keep}'
365
366     parameters:
367       - integration-bundle-url:
368           bundle-url: '{bundle-url}'
369       - distribution-karaf-version:
370           karaf-version: '{karaf-version}'
371
372     triggers:
373       - timed: '{schedule-high-frequency}'
374
375     builders:
376       - trigger-builds:
377           - project: '{csit-high-frequency-list}'
378             block: true
379             predefined-parameters: |
380               BUNDLE_URL=$BUNDLE_URL
381               KARAF_VERSION=$KARAF_VERSION
382
383     publishers:
384       - email-notification:
385           email-recipients: '{email-recipients}'
386           email-prefix: '[integration]'
387
388 - job-template:
389     name: 'integration-update-csit-tests-{stream}'
390
391     # This job's purpose is to update csit
392     # tests to run in integration-distribution-test-{stream}
393     # by updating integration files: csit-list-{stream}.inc
394     # These files can be used as !include in int-dist-test-{stream}
395
396     ######################
397     # Default parameters #
398     ######################
399
400     git-url: '$GIT_URL/$PROJECT'
401     submodule-recursive: true
402
403     #####################
404     # Job Configuration #
405     #####################
406
407     project-type: freestyle
408     node: centos7-builder-2c-8g
409
410     properties:
411       - lf-infra-properties:
412           build-days-to-keep: 7
413
414     parameters:
415       - lf-infra-parameters:
416           project: releng/builder  # Hardcode as this job needs to pull releng/builder
417           stream: '{stream}'
418           branch: master  # Hardcode as releng/builder only has master
419           lftools-version: '{lftools-version}'
420       - string:
421           name: CSIT_BLACKLIST
422           default: '{csit-blacklist}'
423           description: Space separated list of jobs strings to blacklist.
424
425     scm:
426       - lf-infra-gerrit-scm:
427           jenkins-ssh-credential: '{jenkins-ssh-credential}'
428           git-url: '{git-url}'
429           refspec: '$GERRIT_REFSPEC'
430           branch: '$GERRIT_BRANCH'
431           submodule-recursive: '{submodule-recursive}'
432           choosing-strategy: default
433
434     wrappers:
435       - lf-infra-wrappers:
436           build-timeout: 10
437           jenkins-ssh-credential: '{jenkins-ssh-credential}'
438
439     triggers:
440       - reverse:
441           jobs: builder-jjb-merge
442
443     builders:
444       - shell: !include-raw-escape: update-csit-tests.sh
445       - shell: |
446           git status
447           git add jjb/integration/*.lst
448       - lf-infra-push-gerrit-patch:
449           project: 'releng/builder'
450           gerrit-user: 'jenkins-$SILO'
451           gerrit-host: 'git.opendaylight.org'
452           gerrit-topic: 'auto-update-csit-jobs-{stream}'
453           gerrit-commit-message: 'Auto Update CSIT Jobs to run for {stream}'
454           reviewers-email: 'integration-dev@lists.opendaylight.org'
455
456     publishers:
457       - lf-infra-publish