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