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