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