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