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