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