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