19f321b9e6f9d0fb8960f5595985f0129d040117
[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-csit-only
162 # Operation: this macro sets a trigger on reverse job list
163 # Used by: csit -only- job templates
164
165 - trigger:
166     name: integration-csit-only
167     triggers:
168         - reverse:
169             jobs: '{jobs}'
170             result: 'success'
171
172 # Macro: integration-csit-all
173 # Operation: this macro sets a periodic trigger
174 # Used by: csit -all- job teamplates
175
176 - trigger:
177     name: integration-csit-all
178     triggers:
179         - timed: 'H H * * *'
180
181 # Macro: integration-jclouds-controller-mininet
182 # Operation: this macro will spin the controller and mininet vms
183 # Used by: {project}-csit-* job templates
184
185 - wrapper:
186     name: integration-jclouds-controller-mininet
187     wrappers:
188       - jclouds:
189           instances:
190             - rk-c7-java:
191                 cloud-name: 'Rackspace DFW - Integration Dynamic Lab'
192                 count: '{controller-vms}'
193                 stop-on-terminate: False
194             - '{mininet-image}':
195                 cloud-name: '{mininet-cloud-name}'
196                 count: '{mininet-vms}'
197                 stop-on-terminate: False
198
199 #################
200 # Shell Scripts #
201 #################
202
203 # Macro: integration-get-slave-addresses
204 # Operation: this macro gets the IP addresses of the dynamic vms
205 # Used by: {project}-csit-* job templates
206
207 - builder:
208     name: integration-get-slave-addresses
209     builders:
210         - shell:
211             !include-raw:
212                 - include-raw-integration-get-slave-addresses.sh
213
214 # Macro: integration-get-bundle-vars
215 # Operation: this macro gets all bundle related variables
216 # Used by: {project}-csit-3node-* job templates
217
218 - builder:
219     name: integration-get-bundle-vars
220     builders:
221         - shell:
222             !include-raw:
223                 - include-raw-integration-get-bundle-vars.sh
224
225 # Macro: integration-deploy-controller-verify
226 # Operation: this macro deploys the controller with all fetures
227 # Used by: integration-distrbution-deploy-{stream} job template
228
229 - builder:
230     name: integration-deploy-controller-verify
231     builders:
232         - shell:
233             !include-raw:
234                 - include-raw-integration-deploy-controller-verify.sh
235
236 # Macro: integration-deploy-controller-offline
237 # Operation: this macro deploys the controller with no external repo configuration
238 # Used by: integration-distrbution-offline-{stream} job template
239
240 - builder:
241     name: integration-deploy-controller-offline
242     builders:
243         - shell:
244             !include-raw:
245                 - include-raw-integration-deploy-controller-offline.sh
246
247 # Macro: integration-deply-controller-run-test
248 # Operation: this macro deploys single contoller and runs test
249 # Used by: {project}-csit-1node-* job templates
250
251 - builder:
252     name: integration-deploy-controller-run-test
253     builders:
254         - shell:
255             !include-raw:
256                 - include-raw-integration-deploy-controller-run-test.sh
257
258 # Macro: integration-deploy-controller
259 # Operation: this macro prepares 3-node cluster controller
260 # Used by: {project}-csit-3node-* job templates
261
262 - builder:
263     name: integration-deploy-controller
264     builders:
265         - shell:
266             !include-raw:
267                 - include-raw-integration-deploy-controller.sh
268
269 # Macro: integration-configure-clustering
270 # Operation: this macro configures the clustering
271 # Used by: {project}-csit-3node-* job templates
272
273 - builder:
274     name: integration-configure-clustering
275     builders:
276         - shell:
277             !include-raw:
278                 - include-raw-integration-configure-clustering.sh
279
280 # Macro: integration-start-cluster-run-test
281 # Operation: this macro starts the 3-node cluster and runs test
282 # Used by: {project}-csit-3node-* job templates
283
284 - builder:
285     name: integration-start-cluster-run-test
286     builders:
287         - shell:
288             !include-raw:
289                 - include-raw-integration-start-cluster-run-test.sh
290
291 # Macro: integration-get-bundle-url
292 # Operation: this macro gets the job generated distribution URL from distribution pom.xml
293 # Used by: integration-patch-test-{stream} job template
294
295 - builder:
296     name: integration-get-bundle-url
297     builders:
298         - shell:
299             !include-raw:
300                 - include-raw-integration-get-bundle-url.sh
301
302 # Macro: integration-get-bundle-url-root
303 # Operation: this macro gets the job generated distribution URL from root pom.xml
304 # Used by: integration-distribution-verify-{stream} job template
305
306 - builder:
307     name: integration-get-bundle-url-root
308     builders:
309         - shell:
310             !include-raw:
311                 - include-raw-integration-get-bundle-url-root.sh
312
313 # Macro: integration-install-robotframework
314 # Operation: Installs robotframework using pip to a virtualenv
315 # Used by: {project}-csit-* job templates
316
317 - builder:
318     name: integration-install-robotframework
319     builders:
320         - shell:
321             !include-raw:
322                 - include-raw-integration-install-robotframework.sh
323
324 # Macro: integration-cleanup-tmp
325 # Operation: Cleans up temporary files created by build
326 # Used by: {project}-csit-* job templates
327
328 - builder:
329     name: integration-cleanup-tmp
330     builders:
331         - shell:
332             !include-raw:
333                 - include-raw-integration-cleanup-tmp.sh
334
335 # Macro: integration-multipatch-builder
336 # Operation: checks out multiple patches and builds custom distribution
337 # Used by: integration-multipatch-test-* job templates
338
339 - builder:
340     name: integration-multipatch-builder
341     builders:
342         - shell:
343             !include-raw:
344                 - include-raw-integration-multipatch-distribution-test.sh
345
346 # Macro: integration-cleanup-worspace
347 # Operation: Cleans up files possibly left there by the previous build
348 # Used by: {project}-csit-* job templates
349
350 - builder:
351     name: integration-cleanup-workspace
352     builders:
353         - shell:
354             !include-raw:
355                 - include-raw-integration-cleanup-workspace.sh
356
357 # Macro: integration-rebase-patch
358 # Operation: For cloned project, rebase checked-out Gerrit patch onto $BRANCH.
359 # Used by: integration-patch-distribution-* job template
360
361 - builder:
362     name: integration-rebase-gerrit-patch
363     builders:
364         - shell:
365             !include-raw:
366                 - include-raw-integration-rebase-gerrit-patch.sh
367
368 ##############
369 # Publishers #
370 ##############
371
372 # Macro: integration-robot
373 # Operation: this macro publishes robot results
374 # Used by: {project}-csit-* job templates
375
376 - publisher:
377     name: integration-robot
378     publishers:
379         - robot:
380             output-path: ''
381             other-files: ''
382             unstable-threshold: '{unstable-if}'
383             pass-threshold: '{pass-if}'
384             only-critical: false