functest: Adjust job timeout based on the loop
[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     brahmaputra: &brahmaputra
18         stream: brahmaputra
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             <<: *brahmaputra
44         - virtual:
45             slave-label: fuel-virtual
46             installer: fuel
47             <<: *brahmaputra
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             <<: *brahmaputra
61         - virtual:
62             slave-label: joid-virtual
63             installer: joid
64             <<: *brahmaputra
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             <<: *brahmaputra
78         - virtual:
79             slave-label: compass-virtual
80             installer: compass
81             <<: *brahmaputra
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 #--------------------------------
92 #        None-CI PODs
93 #--------------------------------
94         - orange-pod2:
95             slave-label: '{pod}'
96             installer: joid
97             <<: *brahmaputra
98         - orange-pod5:
99             slave-label: '{pod}'
100             installer: fuel
101             <<: *master
102         - orange-pod2:
103             slave-label: '{pod}'
104             installer: joid
105             <<: *master
106         - huawei-pod2:
107             slave-label: '{pod}'
108             installer: compass
109             <<: *master
110         - nokia-pod1:
111             slave-label: '{pod}'
112             installer: apex
113             <<: *master
114         - arm-pod1:
115             slave-label: '{pod}'
116             installer: fuel
117             <<: *master
118         - zte-pod1:
119             slave-label: '{pod}'
120             installer: fuel
121             <<: *master
122         - arm-pod1:
123             slave-label: '{pod}'
124             installer: fuel
125             <<: *brahmaputra
126 #--------------------------------
127
128     testsuite:
129         - 'suite':
130             job-timeout: 60
131         - 'daily':
132             job-timeout: 120
133         - 'weekly':
134             job-timeout: 400
135
136     jobs:
137         - 'functest-{installer}-{pod}-{testsuite}-{stream}'
138
139 ################################
140 # job template
141 ################################
142 - job-template:
143     name: 'functest-{installer}-{pod}-{testsuite}-{stream}'
144
145     concurrent: true
146
147     properties:
148         - throttle:
149             enabled: true
150             max-per-node: 1
151             option: 'project'
152
153     wrappers:
154         - build-name:
155             name: '$BUILD_NUMBER Suite: $FUNCTEST_SUITE_NAME Scenario: $DEPLOY_SCENARIO'
156         - timeout:
157             timeout: '{job-timeout}'
158             abort: true
159
160     parameters:
161         - project-parameter:
162             project: '{project}'
163         - '{slave-label}-defaults'
164         - '{installer}-defaults'
165         - 'functest-{testsuite}-parameter'
166         - string:
167             name: DEPLOY_SCENARIO
168             default: 'os-odl_l2-nofeature-ha'
169         - string:
170             name: DOCKER_TAG
171             default: '{docker-tag}'
172             description: 'Tag to pull docker image'
173         - functest-parameter:
174             gs-pathname: '{gs-pathname}'
175
176     scm:
177         - git-scm:
178             credentials-id: '{ssh-credentials}'
179             refspec: ''
180             branch: '{branch}'
181
182     builders:
183         - description-setter:
184             description: "POD: $NODE_NAME"
185         - 'functest-{testsuite}-builder'
186
187 ########################
188 # parameter macros
189 ########################
190 - parameter:
191     name: functest-daily-parameter
192     parameters:
193         - string:
194             name: FUNCTEST_SUITE_NAME
195             default: 'daily'
196             description: "Daily suite name to run"
197 - parameter:
198     name: functest-weekly-parameter
199     parameters:
200         - string:
201             name: FUNCTEST_SUITE_NAME
202             default: 'weekly'
203             description: "Weekly suite name to run"
204 - parameter:
205     name: functest-suite-parameter
206     parameters:
207         - choice:
208             name: FUNCTEST_SUITE_NAME
209             choices:
210                 - 'healthcheck'
211                 - 'vping_userdata'
212                 - 'vping_ssh'
213                 - 'tempest_smoke_serial'
214                 - 'rally_sanity'
215                 - 'odl'
216                 - 'onos'
217                 - 'promise'
218                 - 'doctor'
219                 - 'bgpvpn'
220                 - 'security_scan'
221                 - 'tempest_full_parallel'
222                 - 'rally_full'
223                 - 'vims'
224                 - 'multisite'
225 - parameter:
226     name: functest-parameter
227     parameters:
228         - string:
229             name: GS_PATHNAME
230             default: '{gs-pathname}'
231             description: "Version directory where the opnfv documents will be stored in gs repository"
232         - string:
233             name: FUNCTEST_REPO_DIR
234             default: "/home/opnfv/repos/functest"
235             description: "Directory where the Functest repository is cloned"
236         - string:
237             name: PUSH_RESULTS_TO_DB
238             default: "true"
239             description: "Push the results of all the tests to the resultDB"
240         - string:
241             name: CI_DEBUG
242             default: 'false'
243             description: "Show debug output information"
244 ########################
245 # trigger macros
246 ########################
247 - trigger:
248     name: 'functest-master'
249     triggers:
250         - pollscm:
251             cron: "H 9 * * *"
252 ########################
253 # builder macros
254 ########################
255 - builder:
256     name: functest-daily-builder
257     builders:
258         - 'functest-cleanup'
259         - 'set-functest-env'
260         - 'functest-daily'
261         - 'functest-store-results'
262
263 - builder:
264     name: functest-weekly-builder
265     builders:
266         - 'functest-cleanup'
267         - 'set-functest-env'
268         - 'functest-weekly'
269         - 'functest-store-results'
270
271 - builder:
272     name: functest-suite-builder
273     builders:
274         - 'functest-cleanup'
275         - 'set-functest-env'
276         - 'functest-suite'
277
278 - builder:
279     name: functest-daily
280     builders:
281         - shell:
282             !include-raw: ./functest-loop.sh
283
284 - builder:
285     name: functest-weekly
286     builders:
287         - shell:
288             !include-raw: ./functest-loop.sh
289
290 - builder:
291     name: functest-suite
292     builders:
293         - shell:
294             !include-raw: ./functest-suite.sh
295
296 - builder:
297     name: set-functest-env
298     builders:
299         - shell:
300             !include-raw: ./set-functest-env.sh
301
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