48ea36761b5f0f8423db8a887ec4f160e2a32fb9
[releng.git] / jjb / functest / functest-ci-jobs.yml
1 ###################################
2 # job configuration for functest
3 ###################################
4 - project:
5     name: functest
6
7     project: '{name}'
8
9 #--------------------------------
10 # BRANCH ANCHORS
11 #--------------------------------
12     master: &master
13         stream: master
14         branch: '{stream}'
15         gs-pathname: ''
16         docker-tag: 'latest'
17     colorado: &colorado
18         stream: colorado
19         branch: 'stable/{stream}'
20         gs-pathname: '/{stream}'
21         docker-tag: 'stable'
22 #--------------------------------
23 # POD, INSTALLER, AND BRANCH MAPPING
24 #--------------------------------
25 #    Installers using labels
26 #            CI PODs
27 # This section should only contain the installers
28 # that have been switched using labels for slaves
29 #--------------------------------
30     pod:
31 # fuel CI PODs
32         - baremetal:
33             slave-label: fuel-baremetal
34             installer: fuel
35             <<: *master
36         - virtual:
37             slave-label: fuel-virtual
38             installer: fuel
39             <<: *master
40         - baremetal:
41             slave-label: fuel-baremetal
42             installer: fuel
43             <<: *colorado
44         - virtual:
45             slave-label: fuel-virtual
46             installer: fuel
47             <<: *colorado
48 # joid CI PODs
49         - baremetal:
50             slave-label: joid-baremetal
51             installer: joid
52             <<: *master
53         - virtual:
54             slave-label: joid-virtual
55             installer: joid
56             <<: *master
57         - baremetal:
58             slave-label: joid-baremetal
59             installer: joid
60             <<: *colorado
61         - virtual:
62             slave-label: joid-virtual
63             installer: joid
64             <<: *colorado
65 # compass CI PODs
66         - baremetal:
67             slave-label: compass-baremetal
68             installer: compass
69             <<: *master
70         - virtual:
71             slave-label: compass-virtual
72             installer: compass
73             <<: *master
74         - baremetal:
75             slave-label: compass-baremetal
76             installer: compass
77             <<: *colorado
78         - virtual:
79             slave-label: compass-virtual
80             installer: compass
81             <<: *colorado
82 # apex CI PODs
83         - apex-verify-master:
84             slave-label: '{pod}'
85             installer: apex
86             <<: *master
87         - apex-daily-master:
88             slave-label: '{pod}'
89             installer: apex
90             <<: *master
91         - apex-verify-colorado:
92             slave-label: '{pod}'
93             installer: apex
94             <<: *colorado
95         - apex-daily-colorado:
96             slave-label: '{pod}'
97             installer: apex
98             <<: *colorado
99 # armband CI PODs
100         - armband-baremetal:
101             slave-label: armband-baremetal
102             installer: fuel
103             <<: *master
104         - armband-virtual:
105             slave-label: armband-virtual
106             installer: fuel
107             <<: *master
108         - armband-baremetal:
109             slave-label: armband-baremetal
110             installer: fuel
111             <<: *colorado
112         - armband-virtual:
113             slave-label: armband-virtual
114             installer: fuel
115             <<: *colorado
116 #--------------------------------
117 #        None-CI PODs
118 #--------------------------------
119         - orange-pod1:
120             slave-label: '{pod}'
121             installer: joid
122             <<: *master
123         - orange-pod5:
124             slave-label: '{pod}'
125             installer: fuel
126             <<: *master
127         - orange-pod2:
128             slave-label: '{pod}'
129             installer: joid
130             <<: *master
131         - huawei-pod2:
132             slave-label: '{pod}'
133             installer: compass
134             <<: *master
135         - huawei-pod5:
136             slave-label: '{pod}'
137             installer: compass
138             <<: *master
139         - nokia-pod1:
140             slave-label: '{pod}'
141             installer: apex
142             <<: *master
143         - arm-pod2:
144             slave-label: '{pod}'
145             installer: fuel
146             <<: *master
147         - zte-pod1:
148             slave-label: '{pod}'
149             installer: fuel
150             <<: *master
151         - zte-pod1:
152             slave-label: '{pod}'
153             installer: fuel
154             <<: *colorado
155         - zte-pod2:
156             slave-label: '{pod}'
157             installer: fuel
158             <<: *master
159         - zte-pod3:
160             slave-label: '{pod}'
161             installer: fuel
162             <<: *master
163         - zte-pod3:
164             slave-label: '{pod}'
165             installer: fuel
166             <<: *colorado
167         - arm-pod2:
168             slave-label: '{pod}'
169             installer: fuel
170             <<: *colorado
171 #--------------------------------
172
173     testsuite:
174         - 'suite':
175             job-timeout: 60
176         - 'daily':
177             job-timeout: 180
178         - 'weekly':
179             job-timeout: 400
180
181     jobs:
182         - 'functest-{installer}-{pod}-{testsuite}-{stream}'
183
184 ################################
185 # job template
186 ################################
187 - job-template:
188     name: 'functest-{installer}-{pod}-{testsuite}-{stream}'
189
190     concurrent: true
191
192     properties:
193         - throttle:
194             enabled: true
195             max-per-node: 1
196             option: 'project'
197
198     wrappers:
199         - build-name:
200             name: '$BUILD_NUMBER Suite: $FUNCTEST_SUITE_NAME Scenario: $DEPLOY_SCENARIO'
201         - timeout:
202             timeout: '{job-timeout}'
203             abort: true
204
205     parameters:
206         - project-parameter:
207             project: '{project}'
208         - '{installer}-defaults'
209         - '{slave-label}-defaults'
210         - 'functest-{testsuite}-parameter'
211         - string:
212             name: DEPLOY_SCENARIO
213             default: 'os-odl_l2-nofeature-ha'
214         - string:
215             name: DOCKER_TAG
216             default: '{docker-tag}'
217             description: 'Tag to pull docker image'
218         - functest-parameter:
219             gs-pathname: '{gs-pathname}'
220
221     scm:
222         - git-scm:
223             credentials-id: '{ssh-credentials}'
224             refspec: ''
225             branch: '{branch}'
226
227     builders:
228         - description-setter:
229             description: "POD: $NODE_NAME"
230         - 'functest-{testsuite}-builder'
231
232 ########################
233 # parameter macros
234 ########################
235 - parameter:
236     name: functest-daily-parameter
237     parameters:
238         - string:
239             name: FUNCTEST_SUITE_NAME
240             default: 'daily'
241             description: "Daily suite name to run"
242 - parameter:
243     name: functest-weekly-parameter
244     parameters:
245         - string:
246             name: FUNCTEST_SUITE_NAME
247             default: 'weekly'
248             description: "Weekly suite name to run"
249 - parameter:
250     name: functest-suite-parameter
251     parameters:
252         - choice:
253             name: FUNCTEST_SUITE_NAME
254             choices:
255                 - 'healthcheck'
256                 - 'vping_userdata'
257                 - 'vping_ssh'
258                 - 'tempest_smoke_serial'
259                 - 'rally_sanity'
260                 - 'odl'
261                 - 'onos'
262                 - 'promise'
263                 - 'doctor'
264                 - 'bgpvpn'
265                 - 'security_scan'
266                 - 'tempest_full_parallel'
267                 - 'rally_full'
268                 - 'vims'
269                 - 'multisite'
270                 - 'parser'
271         - string:
272             name: TESTCASE_OPTIONS
273             default: ''
274             description: 'Addtional parameters specific to test case(s)'
275 - parameter:
276     name: functest-parameter
277     parameters:
278         - string:
279             name: GS_PATHNAME
280             default: '{gs-pathname}'
281             description: "Version directory where the opnfv documents will be stored in gs repository"
282         - string:
283             name: FUNCTEST_REPO_DIR
284             default: "/home/opnfv/repos/functest"
285             description: "Directory where the Functest repository is cloned"
286         - string:
287             name: PUSH_RESULTS_TO_DB
288             default: "true"
289             description: "Push the results of all the tests to the resultDB"
290         - string:
291             name: CI_DEBUG
292             default: 'false'
293             description: "Show debug output information"
294 ########################
295 # trigger macros
296 ########################
297 - trigger:
298     name: 'functest-master'
299     triggers:
300         - pollscm:
301             cron: "H 9 * * *"
302 ########################
303 # builder macros
304 ########################
305 - builder:
306     name: functest-daily-builder
307     builders:
308         - 'functest-cleanup'
309         - 'set-functest-env'
310         - 'functest-daily'
311         - 'functest-store-results'
312         - 'functest-exit'
313
314 - builder:
315     name: functest-weekly-builder
316     builders:
317         - 'functest-cleanup'
318         - 'set-functest-env'
319         - 'functest-weekly'
320         - 'functest-store-results'
321         - 'functest-exit'
322
323 - builder:
324     name: functest-suite-builder
325     builders:
326         - 'functest-cleanup'
327         - 'set-functest-env'
328         - 'functest-suite'
329
330 - builder:
331     name: functest-daily
332     builders:
333         - shell:
334             !include-raw: ./functest-loop.sh
335
336 - builder:
337     name: functest-weekly
338     builders:
339         - shell:
340             !include-raw: ./functest-loop.sh
341
342 - builder:
343     name: functest-suite
344     builders:
345         - shell:
346             !include-raw: ./functest-suite.sh
347
348 - builder:
349     name: set-functest-env
350     builders:
351         - shell:
352             !include-raw: ./set-functest-env.sh
353
354 - builder:
355     name: functest-store-results
356     builders:
357         - shell:
358             !include-raw: ../../utils/push-test-logs.sh
359
360 - builder:
361     name: functest-cleanup
362     builders:
363         - shell:
364             !include-raw: ./functest-cleanup.sh
365
366 - builder:
367     name: functest-exit
368     builders:
369         - shell:
370             !include-raw: ./functest-exit.sh