Merge "Include DLUX dependencies via Vagrant"
[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             projects:
120               - project-compare-type: 'ANT'
121                 project-pattern: '{name}'
122                 branches:
123                   - branch-compare-type: 'ANT'
124                     branch-pattern: '**/{branch}'
125                 file-paths:
126                   - compare-type: 'ANT'
127                     pattern: '{pattern}'
128
129 # Macro: integration-trigger-patch-merged
130 # Operation: this macro sets a trigger for patch merged on a path pattern
131 # Used by: not used yet
132
133 - trigger:
134     name: integration-trigger-patch-merged
135     triggers:
136         - gerrit:
137             server-name: 'OpenDaylight'
138             trigger-on:
139                 - change-merged-event
140                 - comment-added-contains-event:
141                     comment-contains-value: 'remerge'
142             projects:
143               - project-compare-type: 'ANT'
144                 project-pattern: '{name}'
145                 branches:
146                   - branch-compare-type: 'ANT'
147                     branch-pattern: '**/{branch}'
148                 file-paths:
149                   - compare-type: 'ANT'
150                     pattern: '{pattern}'
151
152 # Macro: integration-jclouds-controller-mininet
153 # Operation: this macro will spin the controller and mininet vms
154 # Used by: {project}-csit-* job templates
155
156 - wrapper:
157     name: integration-jclouds-controller-mininet
158     wrappers:
159       - jclouds:
160           instances:
161             - rk-c7-java:
162                 cloud-name: 'Rackspace DFW - Integration Dynamic Lab'
163                 count: '{controller-vms}'
164                 stop-on-terminate: False
165             - '{mininet-image}':
166                 cloud-name: '{mininet-cloud-name}'
167                 count: '{mininet-vms}'
168                 stop-on-terminate: False
169
170 #################
171 # Shell Scripts #
172 #################
173
174 # Macro: integration-get-slave-addresses
175 # Operation: this macro gets the IP addresses of the dynamic vms
176 # Used by: {project}-csit-* job templates
177
178 - builder:
179     name: integration-get-slave-addresses
180     builders:
181         - shell:
182             !include-raw include-raw-integration-get-slave-addresses.sh
183
184 # Macro: integration-get-bundle-vars
185 # Operation: this macro gets all bundle related variables
186 # Used by: {project}-csit-3node-* job templates
187
188 - builder:
189     name: integration-get-bundle-vars
190     builders:
191         - shell:
192             !include-raw include-raw-integration-get-bundle-vars.sh
193
194 # Macro: integration-deploy-controller-verify
195 # Operation: this macro deploys the controller with all fetures
196 # Used by: integration-distrbution-deploy-{stream} job template
197
198 - builder:
199     name: integration-deploy-controller-verify
200     builders:
201         - shell:
202             !include-raw include-raw-integration-deploy-controller-verify.sh
203
204 # Macro: integration-deploy-controller-offline
205 # Operation: this macro deploys the controller with no external repo configuration
206 # Used by: integration-distrbution-offline-{stream} job template
207
208 - builder:
209     name: integration-deploy-controller-offline
210     builders:
211         - shell:
212             !include-raw include-raw-integration-deploy-controller-offline.sh
213
214 # Macro: integration-deply-controller-run-test
215 # Operation: this macro deploys single contoller and runs test
216 # Used by: {project}-csit-1node-* job templates
217
218 - builder:
219     name: integration-deploy-controller-run-test
220     builders:
221         - shell:
222             !include-raw include-raw-integration-deploy-controller-run-test.sh
223
224 # Macro: integration-deploy-controller
225 # Operation: this macro prepares 3-node cluster controller
226 # Used by: {project}-csit-3node-* job templates
227
228 - builder:
229     name: integration-deploy-controller
230     builders:
231         - shell:
232             !include-raw include-raw-integration-deploy-controller.sh
233
234 # Macro: integration-configure-clustering
235 # Operation: this macro configures the clustering
236 # Used by: {project}-csit-3node-* job templates
237
238 - builder:
239     name: integration-configure-clustering
240     builders:
241         - shell:
242             !include-raw include-raw-integration-configure-clustering.sh
243
244 # Macro: integration-start-cluster-run-test
245 # Operation: this macro starts the 3-node cluster and runs test
246 # Used by: {project}-csit-3node-* job templates
247
248 - builder:
249     name: integration-start-cluster-run-test
250     builders:
251         - shell:
252             !include-raw include-raw-integration-start-cluster-run-test.sh
253
254 # Macro: integration-get-bundle-url
255 # Operation: this macro gets the job generated distribution URL from distribution pom.xml
256 # Used by: integration-patch-test-{stream} job template
257
258 - builder:
259     name: integration-get-bundle-url
260     builders:
261         - shell:
262             !include-raw include-raw-integration-get-bundle-url.sh
263
264 # Macro: integration-get-bundle-url-root
265 # Operation: this macro gets the job generated distribution URL from root pom.xml
266 # Used by: integration-distribution-verify-{stream} job template
267
268 - builder:
269     name: integration-get-bundle-url-root
270     builders:
271         - shell:
272             !include-raw include-raw-integration-get-bundle-url-root.sh
273
274 # Macro: integration-install-robotframework
275 # Operation: Installs robotframework using pip to a virtualenv
276 # Used by: {project}-csit-* job templates
277
278 - builder:
279     name: integration-install-robotframework
280     builders:
281         - shell:
282             !include-raw include-raw-integration-install-robotframework.sh
283
284 # Macro: integration-cleanup-tmp
285 # Operation: Cleans up temporary files created by build
286 # Used by: {project}-csit-* job templates
287
288 - builder:
289     name: integration-cleanup-tmp
290     builders:
291         - shell:
292             !include-raw include-raw-integration-cleanup-tmp.sh
293
294 # Macro: integration-multipatch-builder
295 # Operation: checks out multiple patches and builds custom distribution
296 # Used by: integration-multipatch-test-* job templates
297
298 - builder:
299     name: integration-multipatch-builder
300     builders:
301         - shell:
302             !include-raw include-raw-integration-multipatch-distribution-test.sh
303
304 # Macro: integration-cleanup-worspace
305 # Operation: Cleans up files possibly left there by the previous build
306 # Used by: {project}-csit-* job templates
307
308 - builder:
309     name: integration-cleanup-workspace
310     builders:
311         - shell:
312             !include-raw include-raw-integration-cleanup-workspace.sh
313
314 ##############
315 # Publishers #
316 ##############
317
318 # Macro: integration-robot
319 # Operation: this macro publishes robot results
320 # Used by: {project}-csit-* job templates
321
322 - publisher:
323     name: integration-robot
324     publishers:
325         - robot:
326             output-path: ''
327             other-files: ''
328             unstable-threshold: '{unstable-if}'
329             pass-threshold: '{pass-if}'
330             only-critical: false