Merge "Revert "Enable shallow clone for git repos""
[releng/builder.git] / jjb / integration / integration-macros.yaml
1 - parameter:
2     name: integration-branch
3     parameters:
4         - string:
5             name: BRANCH
6             default: '{branch}'
7             description: 'Distribution GIT branch'
8
9 - parameter:
10     name: integration-bundleurl
11     parameters:
12         - string:
13             name: BUNDLEURL
14             default: '{bundleurl}'
15             description: 'URL to karaf distribution zip'
16
17 - parameter:
18     name: integration-jdk-version
19     parameters:
20         - string:
21             name: JDKVERSION
22             default: '{jdkversion}'
23             description: 'Parameter to indicate JAVA Version'
24
25 - parameter:
26     name: integration-controller-scope
27     parameters:
28         - string:
29             name: CONTROLLERSCOPE
30             default: '{controller-scope}'
31             description: 'Feature Only or Feature All test'
32
33 - parameter:
34     name: integration-controller-features
35     parameters:
36         - string:
37             name: CONTROLLERFEATURES
38             default: '{controller-features}'
39             description: 'Features to install in the controller separated by comma'
40
41 - parameter:
42     name: integration-distribution-stream
43     parameters:
44         - string:
45             name: DISTROSTREAM
46             default: '{stream}'
47             description: 'Distribution stream string, for suites to know which behavior to expect'
48
49 - parameter:
50     name: integration-stream-test-plan
51     parameters:
52         - string:
53             name: STREAMTESTPLAN
54             default: '{stream-test-plan}'
55             description: 'Stream-specific test plan we will run'
56
57 - parameter:
58     name: integration-test-plan
59     parameters:
60         - string:
61             name: TESTPLAN
62             default: '{test-plan}'
63             description: 'General test plan we will run unless stream-specific one is found'
64
65 - parameter:
66     name: integration-test-options
67     parameters:
68         - string:
69             name: TESTOPTIONS
70             default: '{test-options}'
71             description: 'Robot command options'
72
73 - parameter:
74     name: integration-distribution-git-url
75     parameters:
76         - string:
77             name: DISTROGITURL
78             default: 'ssh://jenkins-$SILO@git.opendaylight.org:29418/integration/distribution'
79             description: 'Distribution GIT URL (do not modify)'
80
81 - parameter:
82     name: integration-patch-refspec
83     parameters:
84         - string:
85             name: PATCHREFSPEC
86             default: '{branch}'
87             description: 'Integration Patch Refspec'
88
89 # Macro: integration-gerrit-scm
90 # Operation: this macro downloads a project gerrit
91 # Used by: all csit jobs
92
93 - scm:
94     name: integration-gerrit-scm
95     scm:
96         - git:
97             credentials-id: '{credentials-id}'
98             url: '$GIT_BASE'
99             basedir: '{basedir}'
100             refspec: '{refspec}'
101             branches:
102                 - 'origin/{branch}'
103             skip-tag: true
104             choosing-strategy: 'gerrit'
105
106 # Macro: integration-distribution-scm
107 # Operation: this macro downloads the integration/distribution repo using distribution as basedir
108 # Used by: integration-patch-test-{stream} job template
109
110 - scm:
111     name: integration-distribution-scm
112     scm:
113         - git:
114             credentials-id: '{credentials-id}'
115             basedir: 'distribution'
116             url: '$DISTROGITURL'
117             refspec: ''
118             branches:
119                 - 'origin/{branch}'
120             skip-tag: true
121
122 # Macro: integration-trigger-patch-submitted
123 # Operation: this macro sets a trigger for patch submitted on a path pattern
124 # Used by: {project}-verify-csit-* job templates
125
126 - trigger:
127     name: integration-trigger-patch-submitted
128     triggers:
129         - gerrit:
130             server-name: 'OpenDaylight'
131             trigger-on:
132                 - patchset-created-event:
133                     exclude-drafts: 'true'
134                     exclude-trivial-rebase: 'false'
135                     exclude-no-code-change: 'true'
136                 - draft-published-event
137                 - comment-added-contains-event:
138                     comment-contains-value: 'recheck'
139                 - comment-added-contains-event:
140                     comment-contains-value: 'reverify'
141             override-votes: true
142             gerrit-build-unstable-verified-value: +1
143             gerrit-build-unstable-codereview-value: 0
144             projects:
145               - project-compare-type: 'ANT'
146                 project-pattern: '{name}'
147                 branches:
148                   - branch-compare-type: 'ANT'
149                     branch-pattern: '**/{branch}'
150                 file-paths:
151                   - compare-type: 'ANT'
152                     pattern: '{pattern}'
153
154 # Macro: integration-trigger-patch-merged
155 # Operation: this macro sets a trigger for patch merged on a path pattern
156 # Used by: not used yet
157
158 - trigger:
159     name: integration-trigger-patch-merged
160     triggers:
161         - gerrit:
162             server-name: 'OpenDaylight'
163             trigger-on:
164                 - change-merged-event
165                 - comment-added-contains-event:
166                     comment-contains-value: 'remerge'
167             projects:
168               - project-compare-type: 'ANT'
169                 project-pattern: '{name}'
170                 branches:
171                   - branch-compare-type: 'ANT'
172                     branch-pattern: '**/{branch}'
173                 file-paths:
174                   - compare-type: 'ANT'
175                     pattern: '{pattern}'
176
177 # Macro: integration-csit-only
178 # Operation: this macro sets a trigger on reverse job list
179 # Used by: csit -only- job templates
180
181 - trigger:
182     name: integration-csit-only
183     triggers:
184         - reverse:
185             jobs: '{jobs}'
186             result: 'success'
187
188 # Macro: integration-csit-all
189 # Operation: this macro sets a periodic trigger
190 # Used by: csit -all- job teamplates
191
192 - trigger:
193     name: integration-csit-all
194     triggers:
195         - timed: 'H H * * *'
196
197 # Macro: integration-jclouds-controller-mininet
198 # Operation: this macro will spin the controller and mininet vms
199 # Used by: {project}-csit-* job templates
200
201 - wrapper:
202     name: integration-jclouds-controller-mininet
203     wrappers:
204       - jclouds:
205           instances:
206             - rk-c7-java:
207                 cloud-name: 'Rackspace DFW - Integration Dynamic Lab'
208                 count: '{controller-vms}'
209                 stop-on-terminate: False
210             - '{mininet-image}':
211                 cloud-name: '{mininet-cloud-name}'
212                 count: '{mininet-vms}'
213                 stop-on-terminate: False
214
215 # Macro: integration-jclouds-controller-devstack
216 # Operation: this macro will spin the controller and devstack vms
217 # Used by: {project}-csit-openstack job templates
218 - wrapper:
219     name: integration-jclouds-controller-devstack
220     wrappers:
221       - jclouds:
222           instances:
223             - rk-c7-java:
224                 cloud-name: 'Rackspace DFW - Integration Dynamic Lab'
225                 count: '{controller-vms}'
226                 stop-on-terminate: False
227             - rk-c7-devstack:
228                 cloud-name: 'Rackspace DFW - Devstack'
229                 count: '{openstack-vms}'
230                 stop-on-terminate: False
231
232 #################
233 # Shell Scripts #
234 #################
235
236 # Macro: integration-get-slave-addresses
237 # Operation: this macro gets the IP addresses of the dynamic vms
238 # Used by: {project}-csit-* job templates
239
240 - builder:
241     name: integration-get-slave-addresses
242     builders:
243         - shell:
244             !include-raw:
245                 - include-raw-integration-get-slave-addresses.sh
246
247 # Macro: integration-get-bundle-vars
248 # Operation: this macro gets all bundle related variables
249 # Used by: {project}-csit-3node-* job templates
250
251 - builder:
252     name: integration-get-bundle-vars
253     builders:
254         - shell:
255             !include-raw:
256                 - include-raw-integration-get-bundle-vars.sh
257
258 # Macro: integration-distribution-check
259 # Operation: this macro deploys the controller with all fetures
260 # Used by: {project}-distribution-check-{stream} job template
261
262 - builder:
263     name: integration-distribution-check
264     builders:
265         - shell:
266             !include-raw:
267                 - include-raw-integration-distribution-check.sh
268
269 # Macro: integration-deploy-controller-verify
270 # Operation: this macro deploys the controller with all fetures
271 # Used by: integration-distribution-deploy-{stream} job template
272
273 - builder:
274     name: integration-deploy-controller-verify
275     builders:
276         - shell:
277             !include-raw:
278                 - include-raw-integration-deploy-controller-verify.sh
279
280 # Macro: integration-deploy-controller-offline
281 # Operation: this macro deploys the controller with no external repo configuration
282 # Used by: integration-distrbution-offline-{stream} job template
283
284 - builder:
285     name: integration-deploy-controller-offline
286     builders:
287         - shell:
288             !include-raw:
289                 - include-raw-integration-deploy-controller-offline.sh
290
291 # Macro: integration-deply-controller-run-test
292 # Operation: this macro deploys single contoller and runs test
293 # Used by: {project}-csit-1node-* job templates
294
295 - builder:
296     name: integration-deploy-controller-run-test
297     builders:
298         - shell:
299             !include-raw:
300                 - include-raw-integration-deploy-controller-run-test.sh
301
302 # Macro: include-raw-integration-deploy-robot-testing
303 # Operation: this macro only resolves suite path from testplan
304 # Used by: {project}-openstack-{functionality}-daily-{openstack}-{odl} job templates
305
306 - builder:
307     name: include-raw-integration-deploy-devstack-testing
308     builders:
309         - shell:
310             !include-raw:
311                 - include-raw-integration-deploy-devstack-testing.sh
312
313 # Macro: integration-configure-clustering
314 # Operation: this macro configures the clustering
315 # Used by: {project}-csit-3node-* job templates
316
317 - builder:
318     name: integration-configure-clustering
319     builders:
320         - shell:
321             !include-raw:
322                 - include-raw-integration-configure-clustering.sh
323
324 # Macro: integration-start-cluster-run-test
325 # Operation: this macro starts the 3-node cluster and runs test
326 # Used by: {project}-csit-3node-* job templates
327
328 - builder:
329     name: integration-start-cluster-run-test
330     builders:
331         - shell:
332             !include-raw:
333                 - include-raw-integration-start-cluster-run-test.sh
334
335 # Macro: integration-get-bundle-url
336 # Operation: this macro gets the job generated distribution URL from distribution pom.xml
337 # Used by: integration-patch-test-{stream} job template
338
339 - builder:
340     name: integration-get-bundle-url
341     builders:
342         - shell:
343             !include-raw:
344                 - include-raw-integration-get-bundle-url.sh
345
346 # Macro: integration-get-bundle-url-root
347 # Operation: this macro gets the job generated distribution URL from root pom.xml
348 # Used by: integration-distribution-verify-{stream} job template
349
350 - builder:
351     name: integration-get-bundle-url-root
352     builders:
353         - shell:
354             !include-raw:
355                 - include-raw-integration-get-bundle-url-root.sh
356
357 # Macro: integration-install-robotframework
358 # Operation: Installs robotframework using pip to a virtualenv
359 # Used by: {project}-csit-* job templates
360
361 - builder:
362     name: integration-install-robotframework
363     builders:
364         - shell:
365             !include-raw:
366                 - include-raw-integration-install-robotframework.sh
367
368 # Macro: integration-cleanup-tmp
369 # Operation: Cleans up temporary files created by build
370 # Used by: {project}-csit-* job templates
371
372 - builder:
373     name: integration-cleanup-tmp
374     builders:
375         - shell:
376             !include-raw:
377                 - include-raw-integration-cleanup-tmp.sh
378
379 # Macro: integration-multipatch-builder
380 # Operation: checks out multiple patches and builds custom distribution
381 # Used by: integration-multipatch-test-* job templates
382
383 - builder:
384     name: integration-multipatch-builder
385     builders:
386         - shell:
387             !include-raw:
388                 - include-raw-integration-multipatch-distribution-test.sh
389
390 # Macro: integration-cleanup-worspace
391 # Operation: Cleans up files possibly left there by the previous build
392 # Used by: {project}-csit-* job templates
393
394 - builder:
395     name: integration-cleanup-workspace
396     builders:
397         - shell:
398             !include-raw:
399                 - include-raw-integration-cleanup-workspace.sh
400
401 # Macro: integration-rebase-patch
402 # Operation: For cloned project, rebase checked-out Gerrit patch onto $BRANCH.
403 # Used by: integration-patch-distribution-* job template
404
405 - builder:
406     name: integration-rebase-gerrit-patch
407     builders:
408         - shell:
409             !include-raw:
410                 - include-raw-integration-rebase-gerrit-patch.sh
411
412 - builder:
413     name: integration-deploy-openstack-run-test
414     builders:
415         - shell:
416             !include-raw:
417                 - include-raw-integration-deploy-openstack-run-test.sh
418 ##############
419 # Publishers #
420 ##############
421
422 # Macro: integration-robot
423 # Operation: this macro publishes robot results
424 # Used by: {project}-csit-* job templates
425
426 - publisher:
427     name: integration-robot
428     publishers:
429         - robot:
430             output-path: ''
431             other-files: ''
432             unstable-threshold: '{unstable-if}'
433             pass-threshold: '{pass-if}'
434             only-critical: false