Use computes + control for NUM_OS_SYSTEM
[releng.git] / jjb / functest / functest-daily-jobs.yaml
1 ---
2 ###################################
3 # job configuration for functest
4 ###################################
5 - project:
6     name: functest-daily
7
8     project: functest
9
10     # -------------------------------
11     # BRANCH ANCHORS
12     # -------------------------------
13     master: &master
14       stream: master
15       branch: '{stream}'
16       gs-pathname: ''
17     fraser: &fraser
18       stream: fraser
19       branch: 'stable/{stream}'
20       gs-pathname: '/{stream}'
21     # -------------------------------
22     # POD, INSTALLER, AND BRANCH MAPPING
23     # -------------------------------
24     #    Installers using labels
25     #            CI PODs
26     # This section should only contain the installers
27     # that have been switched using labels for slaves
28     # -------------------------------
29     pod:
30       # fuel CI PODs
31       - baremetal:
32           slave-label: fuel-baremetal
33           installer: fuel
34           <<: *master
35       - virtual:
36           slave-label: fuel-virtual
37           installer: fuel
38           <<: *master
39       - baremetal:
40           slave-label: fuel-baremetal
41           installer: fuel
42           <<: *fraser
43       - virtual:
44           slave-label: fuel-virtual
45           installer: fuel
46           <<: *fraser
47       # joid CI PODs
48       - baremetal:
49           slave-label: joid-baremetal
50           installer: joid
51           <<: *master
52       - virtual:
53           slave-label: joid-virtual
54           installer: joid
55           <<: *master
56       - baremetal:
57           slave-label: joid-baremetal
58           installer: joid
59           <<: *fraser
60       - virtual:
61           slave-label: joid-virtual
62           installer: joid
63           <<: *fraser
64       # compass CI PODs
65       - baremetal:
66           slave-label: compass-baremetal
67           installer: compass
68           <<: *master
69       - virtual:
70           slave-label: compass-virtual
71           installer: compass
72           <<: *master
73       - baremetal:
74           slave-label: compass-baremetal
75           installer: compass
76           <<: *fraser
77       - virtual:
78           slave-label: compass-virtual
79           installer: compass
80           <<: *fraser
81       # apex CI PODs
82       - virtual:
83           slave-label: apex-virtual-master
84           installer: apex
85           <<: *master
86       - baremetal:
87           slave-label: apex-baremetal-master
88           installer: apex
89           <<: *master
90       - virtual:
91           slave-label: apex-virtual-fraser
92           installer: apex
93           <<: *fraser
94       - baremetal:
95           slave-label: apex-baremetal-fraser
96           installer: apex
97           <<: *fraser
98       # armband CI PODs
99       - armband-baremetal:
100           slave-label: armband-baremetal
101           installer: fuel
102           <<: *master
103       - armband-virtual:
104           slave-label: armband-virtual
105           installer: fuel
106           <<: *master
107       - armband-baremetal:
108           slave-label: armband-baremetal
109           installer: fuel
110           <<: *fraser
111       - armband-virtual:
112           slave-label: armband-virtual
113           installer: fuel
114           <<: *fraser
115       # daisy CI PODs
116       - baremetal:
117           slave-label: daisy-baremetal
118           installer: daisy
119           <<: *master
120       - virtual:
121           slave-label: daisy-virtual
122           installer: daisy
123           <<: *master
124       - baremetal:
125           slave-label: daisy-baremetal
126           installer: daisy
127           <<: *fraser
128       - virtual:
129           slave-label: daisy-virtual
130           installer: daisy
131           <<: *fraser
132       # netvirt 3rd party ci
133       - virtual:
134           slave-label: odl-netvirt-virtual
135           installer: netvirt
136           <<: *master
137       # -------------------------------
138       #        None-CI PODs
139       # -------------------------------
140       - orange-pod1:
141           slave-label: '{pod}'
142           installer: joid
143           <<: *master
144       - orange-pod5:
145           slave-label: '{pod}'
146           installer: fuel
147           <<: *master
148       - orange-pod2:
149           slave-label: '{pod}'
150           installer: joid
151           <<: *master
152       - baremetal-centos:
153           slave-label: 'intel-pod8'
154           installer: compass
155           <<: *master
156       - nokia-pod1:
157           slave-label: '{pod}'
158           installer: apex
159           <<: *master
160       - zte-pod1:
161           slave-label: '{pod}'
162           installer: fuel
163           <<: *master
164       - zte-pod1:
165           slave-label: '{pod}'
166           installer: fuel
167           <<: *fraser
168       - zte-pod2:
169           slave-label: '{pod}'
170           installer: daisy
171           <<: *master
172       - zte-pod2:
173           slave-label: '{pod}'
174           installer: daisy
175           <<: *fraser
176       - zte-pod3:
177           slave-label: '{pod}'
178           installer: daisy
179           <<: *master
180       - zte-pod3:
181           slave-label: '{pod}'
182           installer: daisy
183           <<: *fraser
184       - zte-pod9:
185           slave-label: '{pod}'
186           installer: daisy
187           <<: *master
188       - zte-pod9:
189           slave-label: '{pod}'
190           installer: daisy
191           <<: *fraser
192     # -------------------------------
193     # PODs for verify jobs triggered by each patch upload
194     #   - ool-virtual1:
195     #       slave-label: '{pod}'
196     #       installer: apex
197     #       <<: *master
198     # -------------------------------
199
200     testsuite:
201       - 'suite':
202           job-timeout: 60
203       - 'daily':
204           job-timeout: 480
205
206     jobs:
207       - 'functest-{installer}-{pod}-{testsuite}-{stream}'
208
209 ################################
210 # job template
211 ################################
212 - job-template:
213     name: 'functest-{installer}-{pod}-{testsuite}-{stream}'
214
215     concurrent: true
216
217     properties:
218       - logrotate-default
219       - throttle:
220           enabled: true
221           max-per-node: 1
222           option: 'project'
223
224     wrappers:
225       - build-name:
226           name: '$BUILD_NUMBER Suite: $FUNCTEST_MODE Scenario: $DEPLOY_SCENARIO'
227       - timeout:
228           timeout: '{job-timeout}'
229           abort: true
230
231     parameters:
232       - project-parameter:
233           project: '{project}'
234           branch: '{branch}'
235       - '{installer}-defaults'
236       - '{slave-label}-defaults'
237       - 'functest-{testsuite}-parameter'
238       - string:
239           name: DEPLOY_SCENARIO
240           default: 'os-nosdn-nofeature-noha'
241       - string:
242           name: CLEAN_DOCKER_IMAGES
243           default: 'false'
244           description: 'Remove downloaded docker images (opnfv/functest*:*)'
245       - functest-parameter:
246           gs-pathname: '{gs-pathname}'
247
248     scm:
249       - git-scm
250
251     builders:
252       - description-setter:
253           description: "Built on $NODE_NAME"
254       - 'functest-{testsuite}-builder'
255
256
257 ########################
258 # parameter macros
259 ########################
260 - parameter:
261     name: functest-daily-parameter
262     parameters:
263       - string:
264           name: FUNCTEST_MODE
265           default: 'daily'
266           description: "Daily suite name to run"
267
268 - parameter:
269     name: functest-suite-parameter
270     parameters:
271       - choice:
272           name: FUNCTEST_MODE
273           choices:
274             - 'tier'
275             - 'testcase'
276           default: 'tier'
277           description: "Test case or Tier to be run"
278       - choice:
279           name: FUNCTEST_SUITE_NAME
280           choices:
281             - 'connection_check'
282             - 'api_check'
283             - 'snaps_health_check'
284             - 'vping_ssh'
285             - 'vping_userdata'
286             - 'cinder_test'
287             - 'tempest_smoke'
288             - 'rally_sanity'
289             - 'refstack_defcore'
290             - 'patrole'
291             - 'odl'
292             - 'snaps_smoke'
293             - 'neutron_trunk'
294             - 'doctor-notification'
295             - 'bgpvpn'
296             - 'functest-odl-sfc'
297             - 'barometercollectd'
298             - 'fds'
299             - 'tempest_full'
300             - 'rally_full'
301             - 'cloudify_ims'
302             - 'vyos_vrouter'
303             - 'juju_epc'
304             - 'parser'
305           default: 'connection_check'
306       - choice:
307           name: FUNCTEST_TIER
308           choices:
309             - 'healthcheck'
310             - 'smoke'
311             - 'features'
312             - 'components'
313             - 'vnf'
314             - 'parser'
315           default: 'healthcheck'
316       - string:
317           name: TESTCASE_OPTIONS
318           default: ''
319           description: 'Additional parameters specific to test case(s)'
320
321 - parameter:
322     name: functest-parameter
323     parameters:
324       - string:
325           name: GS_PATHNAME
326           default: '{gs-pathname}'
327           description: "Version directory where the opnfv documents will be stored in gs repository"
328       - string:
329           name: FUNCTEST_REPO_DIR
330           default: "/home/opnfv/repos/functest"
331           description: "Directory where the Functest repository is cloned"
332       - string:
333           name: PUSH_RESULTS_TO_DB
334           default: "true"
335           description: "Push the results of all the tests to the resultDB"
336       - string:
337           name: CI_DEBUG
338           default: 'false'
339           description: "Show debug output information"
340       - string:
341           name: RC_FILE_PATH
342           default: ''
343           description: "Path to the OS credentials file if given"
344       - string:
345           name: REPO
346           default: "opnfv"
347           description: "Repository name for functest images"
348 ########################
349 # trigger macros
350 ########################
351 - trigger:
352     name: 'functest-master'
353     triggers:
354       - pollscm:
355           cron: "H 9 * * *"
356 ########################
357 # builder macros
358 ########################
359 - builder:
360     name: functest-daily-builder
361     builders:
362       - 'functest-cleanup'
363       - 'functest-daily'
364       - 'functest-store-results'
365       - 'functest-exit'
366
367 - builder:
368     name: functest-suite-builder
369     builders:
370       - 'functest-cleanup'
371       - 'functest-daily'
372       - 'functest-store-results'
373       - 'functest-exit'
374
375 - builder:
376     name: functest-daily
377     builders:
378       # yamllint disable rule:indentation
379       - conditional-step:
380           condition-kind: regex-match
381           regex: "os-.*"
382           label: '$DEPLOY_SCENARIO'
383           steps:
384             - shell:
385                 !include-raw:
386                     - ./functest-env-presetup.sh
387                     - ../../utils/fetch_os_creds.sh
388                     - ./functest-alpine.sh
389       - conditional-step:
390           condition-kind: regex-match
391           regex: "k8-.*"
392           label: '$DEPLOY_SCENARIO'
393           steps:
394             - shell:
395                 !include-raw:
396                     - ../../utils/fetch_k8_conf.sh
397                     - ./functest-k8.sh
398
399 # yamllint enable rule:indentation
400 - builder:
401     name: functest-store-results
402     builders:
403       - shell:
404           !include-raw: ../../utils/push-test-logs.sh
405
406 - builder:
407     name: functest-cleanup
408     builders:
409       - shell:
410           !include-raw: ./functest-cleanup.sh
411
412 - builder:
413     name: functest-exit
414     builders:
415       - shell:
416           !include-raw: ./functest-exit.sh