Functest: Add Apex daily jobs
[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     gambia: &gambia
18       stream: gambia
19       branch: 'stable/{stream}'
20       gs-pathname: '/{stream}'
21     hunter: &hunter
22       stream: hunter
23       branch: 'stable/{stream}'
24       gs-pathname: '/{stream}'
25     # -------------------------------
26     # POD, INSTALLER, AND BRANCH MAPPING
27     # -------------------------------
28     #    Installers using labels
29     #            CI PODs
30     # This section should only contain the installers
31     # that have been switched using labels for slaves
32     # -------------------------------
33     pod:
34       # fuel CI PODs
35       - baremetal:
36           slave-label: fuel-baremetal
37           installer: fuel
38           <<: *master
39       - virtual:
40           slave-label: fuel-virtual
41           installer: fuel
42           <<: *master
43       - baremetal:
44           slave-label: fuel-baremetal
45           installer: fuel
46           <<: *hunter
47       - virtual:
48           slave-label: fuel-virtual
49           installer: fuel
50           <<: *hunter
51       # compass CI PODs
52       - baremetal:
53           slave-label: compass-baremetal
54           installer: compass
55           <<: *gambia
56       - virtual:
57           slave-label: compass-virtual
58           installer: compass
59           <<: *gambia
60       # apex CI PODs
61       - virtual:
62           slave-label: apex-virtual-master
63           installer: apex
64           <<: *master
65       - baremetal:
66           slave-label: apex-baremetal-master
67           installer: apex
68           <<: *master
69       - virtual:
70           slave-label: apex-virtual-master
71           installer: apex
72           <<: *hunter
73       - baremetal:
74           slave-label: apex-baremetal-master
75           installer: apex
76           <<: *hunter
77       - virtual:
78           slave-label: apex-virtual-master
79           installer: apex
80           <<: *gambia
81       - baremetal:
82           slave-label: apex-baremetal-master
83           installer: apex
84           <<: *gambia
85       # armband CI PODs
86       - armband-baremetal:
87           slave-label: armband-baremetal
88           installer: fuel
89           <<: *master
90       - armband-baremetal:
91           slave-label: armband-baremetal
92           installer: fuel
93           <<: *hunter
94
95     testsuite:
96       - 'suite':
97           job-timeout: 60
98       - 'daily':
99           job-timeout: 600
100
101     jobs:
102       - 'functest-{installer}-{pod}-{testsuite}-{stream}'
103
104 ################################
105 # job template
106 ################################
107 - job-template:
108     name: 'functest-{installer}-{pod}-{testsuite}-{stream}'
109
110     concurrent: true
111
112     properties:
113       - logrotate-default
114       - throttle:
115           enabled: true
116           max-per-node: 1
117           max-total: 10
118           option: 'project'
119
120     wrappers:
121       - build-name:
122           name: '$BUILD_NUMBER Suite: $FUNCTEST_MODE Scenario: $DEPLOY_SCENARIO'
123       - timeout:
124           timeout: '{job-timeout}'
125           abort: true
126
127     parameters:
128       - project-parameter:
129           project: '{project}'
130           branch: '{branch}'
131       - '{installer}-defaults'
132       - '{slave-label}-defaults'
133       - 'functest-{testsuite}-parameter'
134       - string:
135           name: DEPLOY_SCENARIO
136           default: 'os-nosdn-nofeature-noha'
137       - string:
138           name: DOCKER_TAG
139           default: ''
140       - string:
141           name: CLEAN_DOCKER_IMAGES
142           default: 'false'
143           description: 'Remove downloaded docker images (opnfv/functest*:*)'
144       - functest-parameter:
145           gs-pathname: '{gs-pathname}'
146
147     scm:
148       - git-scm
149
150     builders:
151       - description-setter:
152           description: "Built on $NODE_NAME"
153       - 'functest-{testsuite}-builder'
154
155
156 ########################
157 # parameter macros
158 ########################
159 - parameter:
160     name: functest-daily-parameter
161     parameters:
162       - string:
163           name: FUNCTEST_MODE
164           default: 'daily'
165           description: "Daily suite name to run"
166
167 - parameter:
168     name: functest-suite-parameter
169     parameters:
170       - choice:
171           name: FUNCTEST_MODE
172           choices:
173             - 'tier'
174             - 'testcase'
175           default: 'tier'
176           description: "Test case or Tier to be run"
177       - choice:
178           name: FUNCTEST_SUITE_NAME
179           choices:
180             - 'connection_check'
181             - 'api_check'
182             - 'snaps_health_check'
183             - 'vping_ssh'
184             - 'vping_userdata'
185             - 'cinder_test'
186             - 'tempest_smoke'
187             - 'rally_sanity'
188             - 'refstack_defcore'
189             - 'patrole'
190             - 'odl'
191             - 'snaps_smoke'
192             - 'shaker'
193             - 'vmtp'
194             - 'neutron_trunk'
195             - 'doctor-notification'
196             - 'bgpvpn'
197             - 'functest-odl-sfc'
198             - 'barometercollectd'
199             - 'fds'
200             - 'tempest_full'
201             - 'rally_full'
202             - 'cloudify_ims'
203             - 'vyos_vrouter'
204             - 'juju_epc'
205             - 'parser'
206           default: 'connection_check'
207       - choice:
208           name: FUNCTEST_TIER
209           choices:
210             - 'healthcheck'
211             - 'smoke'
212             - 'benchmarking'
213             - 'features'
214             - 'components'
215             - 'vnf'
216             - 'parser'
217           default: 'healthcheck'
218       - string:
219           name: TESTCASE_OPTIONS
220           default: ''
221           description: 'Additional parameters specific to test case(s)'
222
223 - parameter:
224     name: functest-parameter
225     parameters:
226       - string:
227           name: GS_PATHNAME
228           default: '{gs-pathname}'
229           description: "Version directory where the opnfv documents will be stored in gs repository"
230       - string:
231           name: FUNCTEST_REPO_DIR
232           default: "/home/opnfv/repos/functest"
233           description: "Directory where the Functest repository is cloned"
234       - string:
235           name: PUSH_RESULTS_TO_DB
236           default: "true"
237           description: "Push the results of all the tests to the resultDB"
238       - string:
239           name: CI_DEBUG
240           default: 'false'
241           description: "Show debug output information"
242       - string:
243           name: RC_FILE_PATH
244           default: ''
245           description: "Path to the OS credentials file if given"
246       - string:
247           name: REPO
248           default: "opnfv"
249           description: "Repository name for functest images"
250 ########################
251 # trigger macros
252 ########################
253 - trigger:
254     name: 'functest-master'
255     triggers:
256       - pollscm:
257           cron: "H 9 * * *"
258 ########################
259 # builder macros
260 ########################
261 - builder:
262     name: functest-daily-builder
263     builders:
264       - 'functest-cleanup'
265       - 'functest-daily'
266       - 'functest-store-results'
267       - 'functest-exit'
268
269 - builder:
270     name: functest-suite-builder
271     builders:
272       - 'functest-cleanup'
273       - 'functest-daily'
274       - 'functest-store-results'
275       - 'functest-exit'
276
277 - builder:
278     name: functest-daily
279     builders:
280       # yamllint disable rule:indentation
281       - conditional-step:
282           condition-kind: regex-match
283           regex: "os-.*"
284           label: '$DEPLOY_SCENARIO'
285           steps:
286             - shell:
287                 !include-raw:
288                     - ./functest-env-presetup.sh
289                     - ../../utils/fetch_os_creds.sh
290                     - ./functest-alpine.sh
291       - conditional-step:
292           condition-kind: regex-match
293           regex: "k8-.*"
294           label: '$DEPLOY_SCENARIO'
295           steps:
296             - shell:
297                 !include-raw:
298                     - ../../utils/fetch_k8_conf.sh
299                     - ./functest-k8.sh
300
301 # yamllint enable rule:indentation
302 - builder:
303     name: functest-store-results
304     builders:
305       - shell:
306           !include-raw: ../../utils/push-test-logs.sh
307
308 - builder:
309     name: functest-cleanup
310     builders:
311       - shell:
312           !include-raw: ./functest-cleanup.sh
313
314 - builder:
315     name: functest-exit
316     builders:
317       - shell:
318           !include-raw: ./functest-exit.sh