0f0cabab3d632e5599207e38686aff5b0f25d5a4
[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         - nokia-pod1:
136             slave-label: '{pod}'
137             installer: apex
138             <<: *master
139         - arm-pod2:
140             slave-label: '{pod}'
141             installer: fuel
142             <<: *master
143         - zte-pod1:
144             slave-label: '{pod}'
145             installer: fuel
146             <<: *master
147         - zte-pod1:
148             slave-label: '{pod}'
149             installer: fuel
150             <<: *colorado
151         - zte-pod2:
152             slave-label: '{pod}'
153             installer: fuel
154             <<: *master
155         - zte-pod3:
156             slave-label: '{pod}'
157             installer: fuel
158             <<: *master
159         - zte-pod3:
160             slave-label: '{pod}'
161             installer: fuel
162             <<: *colorado
163         - arm-pod2:
164             slave-label: '{pod}'
165             installer: fuel
166             <<: *colorado
167 #--------------------------------
168
169     testsuite:
170         - 'suite':
171             job-timeout: 60
172         - 'daily':
173             job-timeout: 180
174         - 'weekly':
175             job-timeout: 400
176
177     jobs:
178         - 'functest-{installer}-{pod}-{testsuite}-{stream}'
179
180 ################################
181 # job template
182 ################################
183 - job-template:
184     name: 'functest-{installer}-{pod}-{testsuite}-{stream}'
185
186     concurrent: true
187
188     properties:
189         - throttle:
190             enabled: true
191             max-per-node: 1
192             option: 'project'
193
194     wrappers:
195         - build-name:
196             name: '$BUILD_NUMBER Suite: $FUNCTEST_SUITE_NAME Scenario: $DEPLOY_SCENARIO'
197         - timeout:
198             timeout: '{job-timeout}'
199             abort: true
200
201     parameters:
202         - project-parameter:
203             project: '{project}'
204         - '{installer}-defaults'
205         - '{slave-label}-defaults'
206         - 'functest-{testsuite}-parameter'
207         - string:
208             name: DEPLOY_SCENARIO
209             default: 'os-odl_l2-nofeature-ha'
210         - string:
211             name: DOCKER_TAG
212             default: '{docker-tag}'
213             description: 'Tag to pull docker image'
214         - functest-parameter:
215             gs-pathname: '{gs-pathname}'
216
217     scm:
218         - git-scm:
219             credentials-id: '{ssh-credentials}'
220             refspec: ''
221             branch: '{branch}'
222
223     builders:
224         - description-setter:
225             description: "POD: $NODE_NAME"
226         - 'functest-{testsuite}-builder'
227
228 ########################
229 # parameter macros
230 ########################
231 - parameter:
232     name: functest-daily-parameter
233     parameters:
234         - string:
235             name: FUNCTEST_SUITE_NAME
236             default: 'daily'
237             description: "Daily suite name to run"
238 - parameter:
239     name: functest-weekly-parameter
240     parameters:
241         - string:
242             name: FUNCTEST_SUITE_NAME
243             default: 'weekly'
244             description: "Weekly suite name to run"
245 - parameter:
246     name: functest-suite-parameter
247     parameters:
248         - choice:
249             name: FUNCTEST_SUITE_NAME
250             choices:
251                 - 'healthcheck'
252                 - 'vping_userdata'
253                 - 'vping_ssh'
254                 - 'tempest_smoke_serial'
255                 - 'rally_sanity'
256                 - 'odl'
257                 - 'onos'
258                 - 'promise'
259                 - 'doctor'
260                 - 'bgpvpn'
261                 - 'security_scan'
262                 - 'tempest_full_parallel'
263                 - 'rally_full'
264                 - 'vims'
265                 - 'multisite'
266                 - 'parser'
267 - parameter:
268     name: functest-parameter
269     parameters:
270         - string:
271             name: GS_PATHNAME
272             default: '{gs-pathname}'
273             description: "Version directory where the opnfv documents will be stored in gs repository"
274         - string:
275             name: FUNCTEST_REPO_DIR
276             default: "/home/opnfv/repos/functest"
277             description: "Directory where the Functest repository is cloned"
278         - string:
279             name: PUSH_RESULTS_TO_DB
280             default: "true"
281             description: "Push the results of all the tests to the resultDB"
282         - string:
283             name: CI_DEBUG
284             default: 'false'
285             description: "Show debug output information"
286 ########################
287 # trigger macros
288 ########################
289 - trigger:
290     name: 'functest-master'
291     triggers:
292         - pollscm:
293             cron: "H 9 * * *"
294 ########################
295 # builder macros
296 ########################
297 - builder:
298     name: functest-daily-builder
299     builders:
300         - 'functest-cleanup'
301         - 'set-functest-env'
302         - 'functest-daily'
303         - 'functest-store-results'
304         - 'functest-exit'
305
306 - builder:
307     name: functest-weekly-builder
308     builders:
309         - 'functest-cleanup'
310         - 'set-functest-env'
311         - 'functest-weekly'
312         - 'functest-store-results'
313         - 'functest-exit'
314
315 - builder:
316     name: functest-suite-builder
317     builders:
318         - 'functest-cleanup'
319         - 'set-functest-env'
320         - 'functest-suite'
321
322 - builder:
323     name: functest-daily
324     builders:
325         - shell:
326             !include-raw: ./functest-loop.sh
327
328 - builder:
329     name: functest-weekly
330     builders:
331         - shell:
332             !include-raw: ./functest-loop.sh
333
334 - builder:
335     name: functest-suite
336     builders:
337         - shell:
338             !include-raw: ./functest-suite.sh
339
340 - builder:
341     name: set-functest-env
342     builders:
343         - shell:
344             !include-raw: ./set-functest-env.sh
345
346 - builder:
347     name: functest-store-results
348     builders:
349         - shell:
350             !include-raw: ../../utils/push-test-logs.sh
351
352 - builder:
353     name: functest-cleanup
354     builders:
355         - shell:
356             !include-raw: ./functest-cleanup.sh
357
358 - builder:
359     name: functest-exit
360     builders:
361         - shell:
362             !include-raw: ./functest-exit.sh