Fix latest tag in functest-virtual.yaml
[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       - latest:
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     triggers:
221       - timed: '@daily'
222     properties:
223       - build-blocker:
224           use-build-blocker: true
225           block-level: 'NODE'
226           queue-scanning: 'BUILDABLE'
227           blocking-jobs:
228             - '{repo}-functest-.*-.*'
229     parameters:
230       - functest-virtual-defaults
231     builders:
232       - multijob:
233           name: pull containers
234           <<: *functest-pulljobs
235       - multijob:
236           name: healthcheck
237           <<: *functest-healthcheckjobs
238       - multijob:
239           name: smoke
240           <<: *functest-smokejobs
241       - multijob:
242           name: benchmarking
243           <<: *functest-benchmarkingjobs
244       - multijob:
245           name: components
246           <<: *functest-componentsjobs
247       - multijob:
248           name: vnf
249           <<: *functest-vnfjobs
250       - multijob:
251           name: features
252           <<: *functest-featuresjobs
253
254 - project:
255     name: repo-functest-tag-daily
256     <<: *functest-defaultparameters
257     jobs:
258       - '{repo}-functest-{tag}-daily'
259
260 - functest-gateparameters: &functest-gateparameters
261     name: 'functest-gateparameters'
262     parameters:
263       - functest-virtual-defaults
264
265 - functest-checkparameters: &functest-checkparameters
266     name: 'functest-checkparameters'
267     parameters:
268       - functest-virtual-defaults
269       - string:
270           name: BRANCH
271           default: '{branch}'
272
273 - builder:
274     name: build-containers
275     builders:
276       - shell: |
277          case "{container}" in
278          "components")
279              args="" ;;
280          *)
281              args="--build-arg BRANCH={ref}" ;;
282          esac
283          cd docker/{container}
284          sudo docker build \
285            ${{args}} --pull=false --no-cache --force-rm=true \
286            -t {repo}/functest-{container}:{tag} .
287
288 - scm:
289     name: functest-scm
290     scm:
291       - git:
292           url: https://gerrit.opnfv.org/gerrit/functest
293           refspec: '+refs/changes/*:refs/changes/*'
294           branches:
295             - '{ref}'
296
297 - functest-buildparameters: &functest-buildparameters
298     name: 'functest-buildparameters'
299     container: '{container}'
300     repo: '{repo}'
301     tag: '{tag}'
302
303 - job-template:
304     name: '{repo}-functest-{container}-{tag}-gate'
305     <<: *functest-gateparameters
306     scm:
307       - functest-scm:
308           ref: $GERRIT_REFSPEC
309     builders:
310       - build-containers:
311           ref: $GERRIT_REFSPEC
312           <<: *functest-buildparameters
313
314 - job-template:
315     name: '{repo}-functest-{container}-{tag}-check'
316     <<: *functest-checkparameters
317     scm:
318       - functest-scm:
319           ref: $BRANCH
320     builders:
321       - build-containers:
322           ref: $BRANCH
323           <<: *functest-buildparameters
324
325 - project:
326     name: repo-functest-container-tag-build
327     <<: *functest-defaultparameters
328     container:
329       - core
330       - tempest
331       - healthcheck
332       - smoke
333       - benchmarking
334       - components
335       - vnf
336       - features
337     jobs:
338       - '{repo}-functest-{container}-{tag}-gate'
339       - '{repo}-functest-{container}-{tag}-check'
340
341 - functest-projectparameters: &functest-projectparameters
342     name: 'functest-projectparameters'
343     current-parameters: true
344
345 - job-template:
346     name: '{repo}-functest-{tag}-gate'
347     project-type: multijob
348     <<: *functest-gateparameters
349     triggers:
350       - gerrit-trigger-patchset-created:
351           project: 'functest'
352           branch: '{branch}'
353           files: '**'
354     properties:
355       - build-blocker:
356           use-build-blocker: true
357           block-level: 'NODE'
358           queue-scanning: 'BUILDABLE'
359           blocking-jobs:
360             - '{repo}-functest-.*-.*'
361     builders:
362       - multijob:
363           name: build functest-core
364           projects:
365             - name: '{repo}-functest-core-{tag}-gate'
366               <<: *functest-projectparameters
367       - multijob:
368           name: build functest-tempest
369           projects:
370             - name: '{repo}-functest-tempest-{tag}-gate'
371               <<: *functest-projectparameters
372       - multijob:
373           name: build all remaining contrainers
374           projects:
375             - name: '{repo}-functest-healthcheck-{tag}-gate'
376               <<: *functest-projectparameters
377             - name: '{repo}-functest-smoke-{tag}-gate'
378               <<: *functest-projectparameters
379             - name: '{repo}-functest-benchmarking-{tag}-gate'
380               <<: *functest-projectparameters
381             - name: '{repo}-functest-components-{tag}-gate'
382               <<: *functest-projectparameters
383             - name: '{repo}-functest-vnf-{tag}-gate'
384               <<: *functest-projectparameters
385             - name: '{repo}-functest-features-{tag}-gate'
386               <<: *functest-projectparameters
387       - multijob:
388           name: healthcheck
389           <<: *functest-healthcheckjobs
390       - multijob:
391           name: smoke
392           <<: *functest-smokejobs
393       - multijob:
394           name: benchmarking
395           <<: *functest-benchmarkingjobs
396       - multijob:
397           name: components
398           <<: *functest-componentsjobs
399       # - multijob:
400       #     name: vnf
401       #     <<: *functest-vnfjobs
402       - multijob:
403           name: features
404           <<: *functest-featuresjobs
405
406 - job-template:
407     name: '{repo}-functest-{tag}-check'
408     project-type: multijob
409     <<: *functest-checkparameters
410     properties:
411       - build-blocker:
412           use-build-blocker: true
413           block-level: 'NODE'
414           queue-scanning: 'BUILDABLE'
415           blocking-jobs:
416             - '{repo}-functest-.*-.*'
417     builders:
418       - multijob:
419           name: build functest-core
420           projects:
421             - name: '{repo}-functest-core-{tag}-check'
422               <<: *functest-projectparameters
423       - multijob:
424           name: build functest-tempest
425           projects:
426             - name: '{repo}-functest-tempest-{tag}-check'
427               <<: *functest-projectparameters
428       - multijob:
429           name: build all remaining contrainers
430           projects:
431             - name: '{repo}-functest-healthcheck-{tag}-check'
432               <<: *functest-projectparameters
433             - name: '{repo}-functest-smoke-{tag}-check'
434               <<: *functest-projectparameters
435             - name: '{repo}-functest-benchmarking-{tag}-check'
436               <<: *functest-projectparameters
437             - name: '{repo}-functest-components-{tag}-check'
438               <<: *functest-projectparameters
439             - name: '{repo}-functest-vnf-{tag}-check'
440               <<: *functest-projectparameters
441             - name: '{repo}-functest-features-{tag}-check'
442               <<: *functest-projectparameters
443       - multijob:
444           name: healthcheck
445           <<: *functest-healthcheckjobs
446       - multijob:
447           name: smoke
448           <<: *functest-smokejobs
449       - multijob:
450           name: benchmarking
451           <<: *functest-benchmarkingjobs
452       - multijob:
453           name: components
454           <<: *functest-componentsjobs
455       # - multijob:
456       #     name: vnf
457       #     <<: *functest-vnfjobs
458       - multijob:
459           name: features
460           <<: *functest-featuresjobs
461
462 - project:
463     name: repo-functest-tag-build
464     <<: *functest-defaultparameters
465     jobs:
466       - '{repo}-functest-{tag}-gate'
467       - '{repo}-functest-{tag}-check'