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