Add check mode in Functest jjbs
[releng.git] / jjb / functest / functest-virtual.yaml
1 ---
2 - functest-defaultparameters: &functest-defaultparameters
3     name: 'functest-defaultparameters'
4     repo: opnfv
5     tag:
6       - gambia:
7           branch: stable/gambia
8       - hunter:
9           branch: stable/hunter
10       - master:
11           branch: master
12
13 - job-template:
14     name: '{repo}-functest-{container}-{tag}-pull'
15     parameters:
16       - functest-virtual-defaults
17     builders:
18       - shell: sudo docker pull {repo}/functest-{container}:{tag}
19
20 - project:
21     name: repo-functest-container-tag-pull
22     <<: *functest-defaultparameters
23     container:
24       - healthcheck
25       - smoke
26       - benchmarking
27       - components
28       - vnf
29       - features
30     jobs:
31       - '{repo}-functest-{container}-{tag}-pull'
32
33 - functest-pulljobs: &functest-pulljobs
34     name: 'functest-pulljobs'
35     projects:
36       - name: '{repo}-functest-healthcheck-{tag}-pull'
37       - name: '{repo}-functest-smoke-{tag}-pull'
38       - name: '{repo}-functest-benchmarking-{tag}-pull'
39       - name: '{repo}-functest-components-{tag}-pull'
40       - name: '{repo}-functest-vnf-{tag}-pull'
41       - name: '{repo}-functest-features-{tag}-pull'
42
43 - job-template:
44     name: '{repo}-functest-{container}-{test}-{tag}-run'
45     parameters:
46       - functest-virtual-defaults
47     builders:
48       - shell: |
49           sudo docker run --rm \
50             -e EXTERNAL_NETWORK=public1 \
51             -v /home/opnfv/functest/results/$JOB_NAME-$BUILD_ID:\
52           /home/opnfv/functest/results \
53             -v /home/opnfv/functest/openstack.creds:\
54           /home/opnfv/functest/conf/env_file \
55             -v /home/opnfv/functest/images:/home/opnfv/functest/images \
56             -v /home/opnfv/functest/tempest_blacklist.yaml:\
57           /usr/lib/python2.7/site-packages/functest/opnfv_tests/openstack/\
58           tempest/custom_tests/blacklist.yaml \
59             -v /home/opnfv/functest/rally_blacklist.yaml:\
60           /usr/lib/python2.7/site-packages/functest/opnfv_tests/openstack/\
61           rally/blacklist.yaml \
62             {repo}/functest-{container}:{tag} run_tests -t {test}
63
64 - project:
65     name: repo-functest-healthcheck-test-tag-run
66     <<: *functest-defaultparameters
67     container: healthcheck
68     test:
69       - connection_check
70       - tenantnetwork1
71       - tenantnetwork2
72       - vmready1
73       - vmready2
74       - singlevm1
75       - singlevm2
76       - vping_ssh
77       - vping_userdata
78       - cinder_test
79       - odl
80       - api_check
81       - snaps_health_check
82     jobs:
83       - '{repo}-functest-{container}-{test}-{tag}-run'
84
85 - functest-healthcheckjobs: &functest-healthcheckjobs
86     name: 'functest-healthcheckjobs'
87     projects:
88       - name: '{repo}-functest-healthcheck-connection_check-{tag}-run'
89       - name: '{repo}-functest-healthcheck-tenantnetwork1-{tag}-run'
90       - name: '{repo}-functest-healthcheck-tenantnetwork2-{tag}-run'
91       - name: '{repo}-functest-healthcheck-vmready1-{tag}-run'
92       - name: '{repo}-functest-healthcheck-vmready2-{tag}-run'
93       - name: '{repo}-functest-healthcheck-singlevm1-{tag}-run'
94       - name: '{repo}-functest-healthcheck-singlevm2-{tag}-run'
95       - name: '{repo}-functest-healthcheck-vping_ssh-{tag}-run'
96       - name: '{repo}-functest-healthcheck-vping_userdata-{tag}-run'
97       - name: '{repo}-functest-healthcheck-cinder_test-{tag}-run'
98       - name: '{repo}-functest-healthcheck-odl-{tag}-run'
99       - name: '{repo}-functest-healthcheck-api_check-{tag}-run'
100       - name: '{repo}-functest-healthcheck-snaps_health_check-{tag}-run'
101
102 - project:
103     name: repo-functest-smoke-test-tag-run
104     <<: *functest-defaultparameters
105     container: smoke
106     test:
107       - tempest_smoke
108       - neutron-tempest-plugin-api
109       - rally_sanity
110       - rally_jobs
111       - refstack_defcore
112       - patrole
113       - snaps_smoke
114       - neutron_trunk
115       - networking-bgpvpn
116       - networking-sfc
117       - barbican
118     jobs:
119       - '{repo}-functest-{container}-{test}-{tag}-run'
120
121 - functest-smokejobs: &functest-smokejobs
122     name: 'functest-smokejobs'
123     projects:
124       - name: '{repo}-functest-smoke-tempest_smoke-{tag}-run'
125       - name: '{repo}-functest-smoke-neutron-tempest-plugin-api-{tag}-run'
126       - name: '{repo}-functest-smoke-rally_sanity-{tag}-run'
127       - name: '{repo}-functest-smoke-rally_jobs-{tag}-run'
128       - name: '{repo}-functest-smoke-refstack_defcore-{tag}-run'
129       - name: '{repo}-functest-smoke-patrole-{tag}-run'
130       - name: '{repo}-functest-smoke-snaps_smoke-{tag}-run'
131       - name: '{repo}-functest-smoke-neutron_trunk-{tag}-run'
132       - name: '{repo}-functest-smoke-networking-bgpvpn-{tag}-run'
133       - name: '{repo}-functest-smoke-networking-sfc-{tag}-run'
134       - name: '{repo}-functest-smoke-barbican-{tag}-run'
135
136 - project:
137     name: repo-functest-benchmarking-test-tag-run'
138     <<: *functest-defaultparameters
139     container: benchmarking
140     test:
141       - vmtp
142       - shaker
143     jobs:
144       - '{repo}-functest-{container}-{test}-{tag}-run'
145
146 - functest-benchmarkingjobs: &functest-benchmarkingjobs
147     name: 'functest-benchmarkingjobs'
148     projects:
149       - name: '{repo}-functest-benchmarking-vmtp-{tag}-run'
150       - name: '{repo}-functest-benchmarking-shaker-{tag}-run'
151
152 - project:
153     name: repo-functest-components-test-tag-run
154     <<: *functest-defaultparameters
155     container: components
156     test:
157       - tempest_full
158       - tempest_scenario
159       - rally_full
160     jobs:
161       - '{repo}-functest-{container}-{test}-{tag}-run'
162
163 - functest-componentsjobs: &functest-componentsjobs
164     name: 'functest-componentsjobs'
165     projects:
166       - name: '{repo}-functest-components-tempest_full-{tag}-run'
167       - name: '{repo}-functest-components-tempest_scenario-{tag}-run'
168       # - name: '{repo}-functest-components-rally_full-{tag}-run'
169
170 - project:
171     name: repo-functest-vnf-{test}-{tag}-run
172     <<: *functest-defaultparameters
173     container: vnf
174     test:
175       - cloudify
176       - cloudify_ims
177       - heat_ims
178       - vyos_vrouter
179       - juju_epc
180     jobs:
181       - '{repo}-functest-{container}-{test}-{tag}-run'
182
183 - functest-vnfjobs: &functest-vnfjobs
184     name: 'functest-vnfjobs'
185     projects:
186       - name: '{repo}-functest-vnf-cloudify-{tag}-run'
187       - name: '{repo}-functest-vnf-cloudify_ims-{tag}-run'
188       - name: '{repo}-functest-vnf-heat_ims-{tag}-run'
189       - name: '{repo}-functest-vnf-vyos_vrouter-{tag}-run'
190       - name: '{repo}-functest-vnf-juju_epc-{tag}-run'
191
192 - project:
193     name: repo-functest-features-test-tag-run
194     <<: *functest-defaultparameters
195     container: features
196     test:
197       - doctor-notification
198       - bgpvpn
199       - functest-odl-sfc
200       - barometercollectd
201       - vgpu
202       - stor4nfv_os
203     jobs:
204       - '{repo}-functest-{container}-{test}-{tag}-run'
205
206 - functest-featuresjobs: &functest-featuresjobs
207     name: 'functest-featuresjobs'
208     projects:
209       - name: '{repo}-functest-features-doctor-notification-{tag}-run'
210       - name: '{repo}-functest-features-bgpvpn-{tag}-run'
211       - name: '{repo}-functest-features-functest-odl-sfc-{tag}-run'
212       - name: '{repo}-functest-features-barometercollectd-{tag}-run'
213       - name: '{repo}-functest-features-vgpu-{tag}-run'
214       - name: '{repo}-functest-features-stor4nfv_os-{tag}-run'
215
216 - job-template:
217     name: '{repo}-functest-{tag}-daily'
218     <<: *functest-defaultparameters
219     project-type: multijob
220     parameters:
221       - functest-virtual-defaults
222     builders:
223       - multijob:
224           name: pull containers
225           <<: *functest-pulljobs
226       - multijob:
227           name: healthcheck
228           <<: *functest-healthcheckjobs
229       - multijob:
230           name: smoke
231           <<: *functest-smokejobs
232       - multijob:
233           name: benchmarking
234           <<: *functest-benchmarkingjobs
235       - multijob:
236           name: components
237           <<: *functest-componentsjobs
238       - multijob:
239           name: vnf
240           <<: *functest-vnfjobs
241       - multijob:
242           name: features
243           <<: *functest-featuresjobs
244
245 - project:
246     name: repo-functest-tag-daily
247     <<: *functest-defaultparameters
248     jobs:
249       - '{repo}-functest-{tag}-daily'
250
251 - functest-gateparameters: &functest-gateparameters
252     name: 'functest-gateparameters'
253     parameters:
254       - functest-virtual-defaults
255
256 - functest-checkparameters: &functest-checkparameters
257     name: 'functest-checkparameters'
258     parameters:
259       - functest-virtual-defaults
260       - string:
261           name: BRANCH
262           default: '{branch}'
263
264 - builder:
265     name: build-containers
266     builders:
267       - shell: |
268          case "{container}" in
269          "components")
270              args="" ;;
271          *)
272              args="--build-arg BRANCH={ref}" ;;
273          esac
274          cd docker/{container}
275          sudo docker build \
276            ${{args}} --pull=false --no-cache --force-rm=true \
277            -t {repo}/functest-{container}:{tag} .
278
279 - scm:
280     name: functest-scm
281     scm:
282       - git:
283           url: https://gerrit.opnfv.org/gerrit/functest
284           refspec: '+refs/changes/*:refs/changes/*'
285           branches:
286             - '{ref}'
287
288 - functest-buildparameters: &functest-buildparameters
289     name: 'functest-buildparameters'
290     container: '{container}'
291     repo: '{repo}'
292     tag: '{tag}'
293
294 - job-template:
295     name: '{repo}-functest-{container}-{tag}-gate'
296     <<: *functest-gateparameters
297     scm:
298       - functest-scm:
299           ref: $GERRIT_REFSPEC
300     builders:
301       - build-containers:
302           ref: $GERRIT_REFSPEC
303           <<: *functest-buildparameters
304
305 - job-template:
306     name: '{repo}-functest-{container}-{tag}-check'
307     <<: *functest-checkparameters
308     scm:
309       - functest-scm:
310           ref: $BRANCH
311     builders:
312       - build-containers:
313           ref: $BRANCH
314           <<: *functest-buildparameters
315
316 - project:
317     name: repo-functest-container-tag-build
318     <<: *functest-defaultparameters
319     container:
320       - core
321       - tempest
322       - healthcheck
323       - smoke
324       - benchmarking
325       - components
326       - vnf
327       - features
328     jobs:
329       - '{repo}-functest-{container}-{tag}-gate'
330       - '{repo}-functest-{container}-{tag}-check'
331
332 - functest-projectparameters: &functest-projectparameters
333     name: 'functest-projectparameters'
334     current-parameters: true
335
336 - job-template:
337     name: '{repo}-functest-{tag}-gate'
338     project-type: multijob
339     <<: *functest-gateparameters
340     triggers:
341       - gerrit-trigger-patchset-created:
342           project: 'functest'
343           branch: '{branch}'
344           files: '**'
345     builders:
346       - multijob:
347           name: build functest-core
348           projects:
349             - name: '{repo}-functest-core-{tag}-gate'
350               <<: *functest-projectparameters
351       - multijob:
352           name: build functest-tempest
353           projects:
354             - name: '{repo}-functest-tempest-{tag}-gate'
355               <<: *functest-projectparameters
356       - multijob:
357           name: build all remaining contrainers
358           projects:
359             - name: '{repo}-functest-healthcheck-{tag}-gate'
360               <<: *functest-projectparameters
361             - name: '{repo}-functest-smoke-{tag}-gate'
362               <<: *functest-projectparameters
363             - name: '{repo}-functest-benchmarking-{tag}-gate'
364               <<: *functest-projectparameters
365             - name: '{repo}-functest-components-{tag}-gate'
366               <<: *functest-projectparameters
367             - name: '{repo}-functest-vnf-{tag}-gate'
368               <<: *functest-projectparameters
369             - name: '{repo}-functest-features-{tag}-gate'
370               <<: *functest-projectparameters
371       - multijob:
372           name: healthcheck
373           <<: *functest-healthcheckjobs
374       - multijob:
375           name: smoke
376           <<: *functest-smokejobs
377       - multijob:
378           name: benchmarking
379           <<: *functest-benchmarkingjobs
380       - multijob:
381           name: components
382           <<: *functest-componentsjobs
383       # - multijob:
384       #     name: vnf
385       #     <<: *functest-vnfjobs
386       - multijob:
387           name: features
388           <<: *functest-featuresjobs
389
390 - job-template:
391     name: '{repo}-functest-{tag}-check'
392     project-type: multijob
393     <<: *functest-checkparameters
394     builders:
395       - multijob:
396           name: build functest-core
397           projects:
398             - name: '{repo}-functest-core-{tag}-check'
399               <<: *functest-projectparameters
400       - multijob:
401           name: build functest-tempest
402           projects:
403             - name: '{repo}-functest-tempest-{tag}-check'
404               <<: *functest-projectparameters
405       - multijob:
406           name: build all remaining contrainers
407           projects:
408             - name: '{repo}-functest-healthcheck-{tag}-check'
409               <<: *functest-projectparameters
410             - name: '{repo}-functest-smoke-{tag}-check'
411               <<: *functest-projectparameters
412             - name: '{repo}-functest-benchmarking-{tag}-check'
413               <<: *functest-projectparameters
414             - name: '{repo}-functest-components-{tag}-check'
415               <<: *functest-projectparameters
416             - name: '{repo}-functest-vnf-{tag}-check'
417               <<: *functest-projectparameters
418             - name: '{repo}-functest-features-{tag}-check'
419               <<: *functest-projectparameters
420       - multijob:
421           name: healthcheck
422           <<: *functest-healthcheckjobs
423       - multijob:
424           name: smoke
425           <<: *functest-smokejobs
426       - multijob:
427           name: benchmarking
428           <<: *functest-benchmarkingjobs
429       - multijob:
430           name: components
431           <<: *functest-componentsjobs
432       # - multijob:
433       #     name: vnf
434       #     <<: *functest-vnfjobs
435       - multijob:
436           name: features
437           <<: *functest-featuresjobs
438
439 - project:
440     name: repo-functest-tag-build
441     <<: *functest-defaultparameters
442     jobs:
443       - '{repo}-functest-{tag}-gate'
444       - '{repo}-functest-{tag}-check'