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