e9c8d10bbcbffd194fedd2bec3f7c57c0f4cda07
[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 and using the project name as basedir
67 # Used by: integration-patch-test-{stream} job template
68
69 - scm:
70     name: integration-gerrit-scm
71     scm:
72         - git:
73             credentials-id: '{credentials-id}'
74             url: '$GIT_BASE'
75             basedir: '$GERRIT_PROJECT'
76             refspec: '$GERRIT_REFSPEC'
77             branches:
78                 - 'origin/{branch}'
79             skip-tag: true
80             choosing-strategy: 'gerrit'
81
82 # Macro: integration-gerrit-test-scm
83 # Operation: this macro downloads an integration/test gerrit using test as basedir
84 # Used by: {project}-verify-csit-* job templates
85
86 - scm:
87     name: integration-gerrit-test-scm
88     scm:
89         - git:
90             credentials-id: '{credentials-id}'
91             url: '$GIT_BASE'
92             basedir: 'test'
93             refspec: '$GERRIT_REFSPEC'
94             branches:
95                 - 'origin/{branch}'
96             skip-tag: true
97             choosing-strategy: 'gerrit'
98
99 # Macro: integration-distribution-scm
100 # Operation: this macro downloads the integration/distribution repo using distribution as basedir
101 # Used by: {project}-csit-* and integration-patch-test-{stream} job templates
102
103 - scm:
104     name: integration-distribution-scm
105     scm:
106         - git:
107             credentials-id: '{credentials-id}'
108             basedir: 'distribution'
109             url: '$DISTROGITURL'
110             refspec: ''
111             branches:
112                 - 'origin/{branch}'
113             skip-tag: true
114
115 # Macro: integration-patch-scm
116 # Operation: this macro downloads a test patch that can be used to debug in the sandbox
117 # Used by: {project}-csit-* job templates
118
119 - scm:
120     name: integration-test-scm
121     scm:
122         - git:
123             credentials-id: '{credentials-id}'
124             basedir: 'test'
125             url: '$GIT_BASE'
126             refspec: '$PATCHREFSPEC'
127             branches:
128                 - 'origin/{branch}'
129             skip-tag: true
130             choosing-strategy: 'gerrit'
131
132 # Macro: integration-test-gerrit-trigger-patch-submitted
133 # Operation: this macro sets a trigger for patch submit on csit/suites/{project}/**
134 # Used by: {project}-verify-csit-* job templates
135
136 - trigger:
137     name: integration-test-gerrit-trigger-patch-submitted
138     triggers:
139         - gerrit:
140             server-name: 'OpenDaylight'
141             trigger-on:
142                 - patchset-created-event:
143                     exclude-drafts: 'true'
144                     exclude-trivial-rebase: 'false'
145                     exclude-no-code-change: 'true'
146                 - draft-published-event
147                 - comment-added-contains-event:
148                     comment-contains-value: 'recheck'
149                 - comment-added-contains-event:
150                     comment-contains-value: 'reverify'
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: 'csit/suites/{project}/**'
160
161 # Macro: integration-csit-gerrit-trigger-patch-submitted
162 # Operation: this macro sets a trigger for patch submit on csit/libraries
163 # Used by: integration-verify-csit-1node-{stream} job template
164
165 - trigger:
166     name: integration-csit-gerrit-trigger-patch-submitted
167     triggers:
168         - gerrit:
169             server-name: 'OpenDaylight'
170             trigger-on:
171                 - patchset-created-event:
172                     exclude-drafts: 'true'
173                     exclude-trivial-rebase: 'false'
174                     exclude-no-code-change: 'true'
175                 - draft-published-event
176                 - comment-added-contains-event:
177                     comment-contains-value: 'recheck'
178                 - comment-added-contains-event:
179                     comment-contains-value: 'reverify'
180             projects:
181               - project-compare-type: 'ANT'
182                 project-pattern: '{name}'
183                 branches:
184                   - branch-compare-type: 'ANT'
185                     branch-pattern: '**/{branch}'
186                 file-paths:
187                   - compare-type: 'ANT'
188                     pattern: 'csit/libraries/*'
189
190 # Macro: integration-csit-gerrit-trigger-patch-merged
191 # Operation: this macro sets a trigger for patch merged on csit/**
192 # Used by: not used yet
193
194 - trigger:
195     name: integration-csit-gerrit-trigger-patch-merged
196     triggers:
197         - gerrit:
198             server-name: 'OpenDaylight'
199             trigger-on:
200                 - change-merged-event
201                 - comment-added-contains-event:
202                     comment-contains-value: 'remerge'
203             projects:
204               - project-compare-type: 'ANT'
205                 project-pattern: '{name}'
206                 branches:
207                   - branch-compare-type: 'ANT'
208                     branch-pattern: '**/{branch}'
209                 file-paths:
210                   - compare-type: 'ANT'
211                     pattern: 'csit/**'
212
213 # Macro: integration-jclouds-controller-mininet
214 # Operation: this macro will spin the controller and mininet vms
215 # Used by: {project}-csit-* job templates
216
217 - wrapper:
218     name: integration-jclouds-controller-mininet
219     wrappers:
220       - jclouds:
221           instances:
222             - rk-c-el6-java:
223                 cloud-name: 'Rackspace DFW - Integration Dynamic Lab'
224                 count: '{controller-vms}'
225                 stop-on-terminate: False
226             - '{mininet-image}':
227                 cloud-name: 'Rackspace DFW - Integration Dynamic Lab'
228                 count: '{mininet-vms}'
229                 stop-on-terminate: False
230
231 #################
232 # Shell Scripts #
233 #################
234
235 # Macro: integration-get-slave-addresses
236 # Operation: this macro gets the IP addresses of the dynamic vms
237 # Used by: {project}-csit-* job templates
238
239 - builder:
240     name: integration-get-slave-addresses
241     builders:
242         - shell:
243             !include-raw include-raw-integration-get-slave-addresses.sh
244
245 # Macro: integration-get-bundle-vars
246 # Operation: this macro gets all bundle related variables
247 # Used by: {project}-csit-3node-* job templates
248
249 - builder:
250     name: integration-get-bundle-vars
251     builders:
252         - shell:
253             !include-raw include-raw-integration-get-bundle-vars.sh
254
255 # Macro: integration-deply-controller-run-test
256 # Operation: this macro deployes single contoller and runs test
257 # Used by: {project}-csit-1node-* job templates
258
259 - builder:
260     name: integration-deploy-controller-run-test
261     builders:
262         - shell:
263             !include-raw include-raw-integration-deploy-controller-run-test.sh
264
265 # Macro: integration-deploy-controller
266 # Operation: this macro prepares 3-node cluster controller
267 # Used by: {project}-csit-3node-* job templates
268
269 - builder:
270     name: integration-deploy-controller
271     builders:
272         - shell:
273             !include-raw include-raw-integration-deploy-controller.sh
274
275 # Macro: integration-configure-clustering
276 # Operation: this macro configures the clustering
277 # Used by: {project}-csit-3node-* job templates
278
279 - builder:
280     name: integration-configure-clustering
281     builders:
282         - shell:
283             !include-raw include-raw-integration-configure-clustering.sh
284
285 # Macro: integration-start-cluster-run-test
286 # Operation: this macro starts the 3-node cluster and runs test
287 # Used by: {project}-csit-3node-* job templates
288
289 - builder:
290     name: integration-start-cluster-run-test
291     builders:
292         - shell:
293             !include-raw include-raw-integration-start-cluster-run-test.sh
294
295 # Macro: integration-deploy-controller-offline
296 # Operation: this macro deployes the controller with no external repo configuration
297 # Used by: integration-distrbution-offline-{stream} job template
298
299 - builder:
300     name: integration-deploy-controller-offline
301     builders:
302         - shell:
303             !include-raw include-raw-integration-deploy-controller-offline.sh
304
305 # Macro: integration-get-bundle-url
306 # Operation: this macro gets the distribution bundle URL
307 # Used by: integration-patch-test-{stream} job template
308
309 - builder:
310     name: integration-get-bundle-url
311     builders:
312         - shell:
313             !include-raw include-raw-integration-get-bundle-url.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