Revert "Apex: Fix incorrect block syntax in other jobs"
[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:
14     name: alpine-pull
15     parameters:
16       - functest-virtual-defaults
17     builders:
18       - shell: sudo docker pull alpine:3.8
19
20 - job-template:
21     name: '{repo}-functest-{container}-{tag}-pull'
22     parameters:
23       - functest-virtual-defaults
24     builders:
25       - shell: sudo docker pull {repo}/functest-{container}:{tag}
26
27 - project:
28     name: repo-functest-container-tag-pull
29     <<: *functest-defaultparameters
30     container:
31       - core
32       - tempest
33       - healthcheck
34       - smoke
35       - benchmarking
36       - components
37       - vnf
38       - features
39     jobs:
40       - '{repo}-functest-{container}-{tag}-pull'
41
42 - functest-pulljobs: &functest-pulljobs
43     name: 'functest-pulljobs'
44     projects:
45       - name: 'alpine-pull'
46       - name: '{repo}-functest-core-{tag}-pull'
47       - name: '{repo}-functest-tempest-{tag}-pull'
48       - name: '{repo}-functest-healthcheck-{tag}-pull'
49       - name: '{repo}-functest-smoke-{tag}-pull'
50       - name: '{repo}-functest-benchmarking-{tag}-pull'
51       - name: '{repo}-functest-components-{tag}-pull'
52       - name: '{repo}-functest-vnf-{tag}-pull'
53       - name: '{repo}-functest-features-{tag}-pull'
54
55 - job:
56     name: alpine-rmi
57     parameters:
58       - functest-virtual-defaults
59     builders:
60       - shell: sudo docker rmi alpine:3.8
61
62 - job-template:
63     name: '{repo}-functest-{container}-{tag}-rmi'
64     parameters:
65       - functest-virtual-defaults
66     builders:
67       - shell: sudo docker rmi {repo}/functest-{container}:{tag}
68
69 - project:
70     name: repo-functest-container-tag-rmi
71     <<: *functest-defaultparameters
72     container:
73       - core
74       - tempest
75       - healthcheck
76       - smoke
77       - benchmarking
78       - components
79       - vnf
80       - features
81     jobs:
82       - '{repo}-functest-{container}-{tag}-rmi'
83
84 - job-template:
85     name: '{repo}-functest-{container}-{test}-{tag}-run'
86     parameters:
87       - functest-virtual-defaults
88     builders:
89       - shell: |
90           sudo docker run --rm \
91             -e EXTERNAL_NETWORK=public1 \
92             -v /home/opnfv/functest/results/$JOB_NAME-$BUILD_ID:\
93           /home/opnfv/functest/results \
94             -v /home/opnfv/functest/openstack.creds:\
95           /home/opnfv/functest/conf/env_file \
96             -v /home/opnfv/functest/images:/home/opnfv/functest/images \
97             -v /home/opnfv/functest/tempest_blacklist.yaml:\
98           /usr/lib/python2.7/site-packages/functest/opnfv_tests/openstack/\
99           tempest/custom_tests/blacklist.yaml \
100             -v /home/opnfv/functest/rally_blacklist.yaml:\
101           /usr/lib/python2.7/site-packages/functest/opnfv_tests/openstack/\
102           rally/blacklist.yaml \
103             {repo}/functest-{container}:{tag} run_tests -t {test} || \
104             export RES=$?
105           gsutil -m cp -r /home/opnfv/functest/results/$JOB_NAME-$BUILD_ID \
106             gs://artifacts.opnfv.org/functest/ > /dev/null
107           find /home/opnfv/functest/results/$JOB_NAME-$BUILD_ID -type f \
108             -printf \
109             "http://artifacts.opnfv.org/functest/$JOB_NAME-$BUILD_ID/%f\n"
110           sudo rm -rf /home/opnfv/functest/results/$JOB_NAME-$BUILD_ID
111           exit $RES
112
113 - project:
114     name: repo-functest-healthcheck-test-tag-run
115     <<: *functest-defaultparameters
116     container: healthcheck
117     test:
118       - connection_check
119       - tenantnetwork1
120       - tenantnetwork2
121       - vmready1
122       - vmready2
123       - singlevm1
124       - singlevm2
125       - vping_ssh
126       - vping_userdata
127       - cinder_test
128       - odl
129       - api_check
130       - snaps_health_check
131     jobs:
132       - '{repo}-functest-{container}-{test}-{tag}-run'
133
134 - functest-healthcheckjobs: &functest-healthcheckjobs
135     name: 'functest-healthcheckjobs'
136     projects:
137       - name: '{repo}-functest-healthcheck-connection_check-{tag}-run'
138       - name: '{repo}-functest-healthcheck-tenantnetwork1-{tag}-run'
139       - name: '{repo}-functest-healthcheck-tenantnetwork2-{tag}-run'
140       - name: '{repo}-functest-healthcheck-vmready1-{tag}-run'
141       - name: '{repo}-functest-healthcheck-vmready2-{tag}-run'
142       - name: '{repo}-functest-healthcheck-singlevm1-{tag}-run'
143       - name: '{repo}-functest-healthcheck-singlevm2-{tag}-run'
144       - name: '{repo}-functest-healthcheck-vping_ssh-{tag}-run'
145       - name: '{repo}-functest-healthcheck-vping_userdata-{tag}-run'
146       - name: '{repo}-functest-healthcheck-cinder_test-{tag}-run'
147       - name: '{repo}-functest-healthcheck-odl-{tag}-run'
148       - name: '{repo}-functest-healthcheck-api_check-{tag}-run'
149       - name: '{repo}-functest-healthcheck-snaps_health_check-{tag}-run'
150
151 - project:
152     name: repo-functest-smoke-test-tag-run
153     <<: *functest-defaultparameters
154     container: smoke
155     test:
156       - tempest_smoke
157       - neutron-tempest-plugin-api
158       - rally_sanity
159       - rally_jobs
160       - refstack_defcore
161       - patrole
162       - snaps_smoke
163       - neutron_trunk
164       - networking-bgpvpn
165       - networking-sfc
166       - barbican
167     jobs:
168       - '{repo}-functest-{container}-{test}-{tag}-run'
169
170 - functest-smokejobs: &functest-smokejobs
171     name: 'functest-smokejobs'
172     projects:
173       - name: '{repo}-functest-smoke-tempest_smoke-{tag}-run'
174       - name: '{repo}-functest-smoke-neutron-tempest-plugin-api-{tag}-run'
175       - name: '{repo}-functest-smoke-rally_sanity-{tag}-run'
176       - name: '{repo}-functest-smoke-rally_jobs-{tag}-run'
177       - name: '{repo}-functest-smoke-refstack_defcore-{tag}-run'
178       - name: '{repo}-functest-smoke-patrole-{tag}-run'
179       - name: '{repo}-functest-smoke-snaps_smoke-{tag}-run'
180       - name: '{repo}-functest-smoke-neutron_trunk-{tag}-run'
181       - name: '{repo}-functest-smoke-networking-bgpvpn-{tag}-run'
182       - name: '{repo}-functest-smoke-networking-sfc-{tag}-run'
183       - name: '{repo}-functest-smoke-barbican-{tag}-run'
184
185 - project:
186     name: repo-functest-benchmarking-test-tag-run'
187     <<: *functest-defaultparameters
188     container: benchmarking
189     test:
190       - vmtp
191       - shaker
192     jobs:
193       - '{repo}-functest-{container}-{test}-{tag}-run'
194
195 - functest-benchmarkingjobs: &functest-benchmarkingjobs
196     name: 'functest-benchmarkingjobs'
197     projects:
198       - name: '{repo}-functest-benchmarking-vmtp-{tag}-run'
199       - name: '{repo}-functest-benchmarking-shaker-{tag}-run'
200
201 - project:
202     name: repo-functest-components-test-tag-run
203     <<: *functest-defaultparameters
204     container: components
205     test:
206       - tempest_full
207       - tempest_scenario
208       - rally_full
209     jobs:
210       - '{repo}-functest-{container}-{test}-{tag}-run'
211
212 - functest-componentsjobs: &functest-componentsjobs
213     name: 'functest-componentsjobs'
214     projects:
215       - name: '{repo}-functest-components-tempest_full-{tag}-run'
216       - name: '{repo}-functest-components-tempest_scenario-{tag}-run'
217       # - name: '{repo}-functest-components-rally_full-{tag}-run'
218
219 - project:
220     name: repo-functest-vnf-{test}-{tag}-run
221     <<: *functest-defaultparameters
222     container: vnf
223     test:
224       - cloudify
225       - cloudify_ims
226       - heat_ims
227       - vyos_vrouter
228       - juju_epc
229     jobs:
230       - '{repo}-functest-{container}-{test}-{tag}-run'
231
232 - functest-vnfjobs: &functest-vnfjobs
233     name: 'functest-vnfjobs'
234     projects:
235       - name: '{repo}-functest-vnf-cloudify-{tag}-run'
236       - name: '{repo}-functest-vnf-cloudify_ims-{tag}-run'
237       - name: '{repo}-functest-vnf-heat_ims-{tag}-run'
238       - name: '{repo}-functest-vnf-vyos_vrouter-{tag}-run'
239       - name: '{repo}-functest-vnf-juju_epc-{tag}-run'
240
241 - project:
242     name: repo-functest-features-test-tag-run
243     <<: *functest-defaultparameters
244     container: features
245     test:
246       - doctor-notification
247       - bgpvpn
248       - functest-odl-sfc
249       - barometercollectd
250       - vgpu
251       - stor4nfv_os
252     jobs:
253       - '{repo}-functest-{container}-{test}-{tag}-run'
254
255 - functest-featuresjobs: &functest-featuresjobs
256     name: 'functest-featuresjobs'
257     projects:
258       - name: '{repo}-functest-features-doctor-notification-{tag}-run'
259       - name: '{repo}-functest-features-bgpvpn-{tag}-run'
260       - name: '{repo}-functest-features-functest-odl-sfc-{tag}-run'
261       - name: '{repo}-functest-features-barometercollectd-{tag}-run'
262       - name: '{repo}-functest-features-vgpu-{tag}-run'
263       - name: '{repo}-functest-features-stor4nfv_os-{tag}-run'
264
265 - job-template:
266     name: '{repo}-functest-{tag}-run'
267     project-type: multijob
268     parameters:
269       - functest-virtual-defaults
270     builders:
271       - multijob:
272           name: healthcheck
273           <<: *functest-healthcheckjobs
274       - multijob:
275           name: smoke
276           <<: *functest-smokejobs
277       - multijob:
278           name: benchmarking
279           <<: *functest-benchmarkingjobs
280       - multijob:
281           name: components
282           <<: *functest-componentsjobs
283       # - multijob:
284       #     name: vnf
285       #     <<: *functest-vnfjobs
286       - multijob:
287           name: features
288           <<: *functest-featuresjobs
289
290 - project:
291     name: repo-functest-tag-run
292     <<: *functest-defaultparameters
293     jobs:
294       - '{repo}-functest-{tag}-run'
295
296 - functest-advcontainers-rmi: &functest-advcontainers-rmi
297     name: 'functest-advcontainers-rmi'
298     projects:
299       - name: '{repo}-functest-smoke-{tag}-rmi'
300       - name: '{repo}-functest-benchmarking-{tag}-rmi'
301       - name: '{repo}-functest-components-{tag}-rmi'
302       - name: '{repo}-functest-vnf-{tag}-rmi'
303       - name: '{repo}-functest-features-{tag}-rmi'
304
305 - job-template:
306     name: '{repo}-functest-{tag}-daily'
307     <<: *functest-defaultparameters
308     project-type: multijob
309     triggers:
310       - timed: '@daily'
311     properties:
312       - build-blocker:
313           use-build-blocker: true
314           block-level: 'NODE'
315           queue-scanning: 'BUILDABLE'
316           blocking-jobs:
317             - '{repo}-functest-.*-.*'
318     parameters:
319       - functest-virtual-defaults
320     builders:
321       - multijob:
322           name: pull containers
323           <<: *functest-pulljobs
324       - multijob:
325           name: run containers
326           condition: ALWAYS
327           projects:
328             - name: '{repo}-functest-{tag}-run'
329       - multijob:
330           name: remove advanced functest containers
331           condition: ALWAYS
332           <<: *functest-advcontainers-rmi
333       - multijob:
334           name: remove functest-tempest
335           condition: ALWAYS
336           projects:
337             - name: '{repo}-functest-tempest-{tag}-rmi'
338       - multijob:
339           name: remove functest-core
340           condition: ALWAYS
341           projects:
342             - name: '{repo}-functest-core-{tag}-rmi'
343       - multijob:
344           name: remove alpine
345           projects:
346             - name: 'alpine-rmi'
347
348 - project:
349     name: repo-functest-tag-daily
350     <<: *functest-defaultparameters
351     jobs:
352       - '{repo}-functest-{tag}-daily'
353
354 - functest-gateparameters: &functest-gateparameters
355     name: 'functest-gateparameters'
356     parameters:
357       - functest-virtual-defaults
358
359 - functest-checkparameters: &functest-checkparameters
360     name: 'functest-checkparameters'
361     parameters:
362       - functest-virtual-defaults
363       - string:
364           name: BRANCH
365           default: '{branch}'
366
367 - builder:
368     name: build-containers
369     builders:
370       - shell: |
371          case "{container}" in
372          "components")
373              args="" ;;
374          *)
375              args="--build-arg BRANCH={ref}" ;;
376          esac
377          cd docker/{container}
378          sudo docker build \
379            ${{args}} --pull=false --no-cache --force-rm=true \
380            -t {repo}/functest-{container}:{tag} .
381
382 - scm:
383     name: functest-scm
384     scm:
385       - git:
386           url: https://gerrit.opnfv.org/gerrit/functest
387           refspec: '+refs/changes/*:refs/changes/*'
388           branches:
389             - '{ref}'
390
391 - functest-buildparameters: &functest-buildparameters
392     name: 'functest-buildparameters'
393     container: '{container}'
394     repo: '{repo}'
395     tag: '{tag}'
396
397 - job-template:
398     name: '{repo}-functest-{container}-{tag}-gate'
399     <<: *functest-gateparameters
400     scm:
401       - functest-scm:
402           ref: $GERRIT_REFSPEC
403     builders:
404       - build-containers:
405           ref: $GERRIT_REFSPEC
406           <<: *functest-buildparameters
407
408 - job-template:
409     name: '{repo}-functest-{container}-{tag}-check'
410     <<: *functest-checkparameters
411     scm:
412       - functest-scm:
413           ref: $BRANCH
414     builders:
415       - build-containers:
416           ref: $BRANCH
417           <<: *functest-buildparameters
418
419 - project:
420     name: repo-functest-container-tag-build
421     <<: *functest-defaultparameters
422     container:
423       - core
424       - tempest
425       - healthcheck
426       - smoke
427       - benchmarking
428       - components
429       - vnf
430       - features
431     jobs:
432       - '{repo}-functest-{container}-{tag}-gate'
433       - '{repo}-functest-{container}-{tag}-check'
434
435 - functest-projectparameters: &functest-projectparameters
436     name: 'functest-projectparameters'
437     current-parameters: true
438
439 - job-template:
440     name: '{repo}-functest-{tag}-gate'
441     project-type: multijob
442     <<: *functest-gateparameters
443     triggers:
444       - gerrit-trigger-patchset-created:
445           project: 'functest'
446           branch: '{branch}'
447           files: '**'
448     properties:
449       - build-blocker:
450           use-build-blocker: true
451           block-level: 'NODE'
452           queue-scanning: 'BUILDABLE'
453           blocking-jobs:
454             - '{repo}-functest-.*-.*'
455     builders:
456       - multijob:
457           name: pull alpine
458           projects:
459             - name: 'alpine-pull'
460       - multijob:
461           name: build functest-core
462           projects:
463             - name: '{repo}-functest-core-{tag}-gate'
464               <<: *functest-projectparameters
465       - multijob:
466           name: build functest-tempest
467           projects:
468             - name: '{repo}-functest-tempest-{tag}-gate'
469               <<: *functest-projectparameters
470       - multijob:
471           name: build all remaining contrainers
472           projects:
473             - name: '{repo}-functest-healthcheck-{tag}-gate'
474               <<: *functest-projectparameters
475             - name: '{repo}-functest-smoke-{tag}-gate'
476               <<: *functest-projectparameters
477             - name: '{repo}-functest-benchmarking-{tag}-gate'
478               <<: *functest-projectparameters
479             - name: '{repo}-functest-components-{tag}-gate'
480               <<: *functest-projectparameters
481             - name: '{repo}-functest-vnf-{tag}-gate'
482               <<: *functest-projectparameters
483             - name: '{repo}-functest-features-{tag}-gate'
484               <<: *functest-projectparameters
485       - multijob:
486           name: run containers
487           condition: ALWAYS
488           projects:
489             - name: '{repo}-functest-{tag}-run'
490       - multijob:
491           name: remove advanced functest containers
492           condition: ALWAYS
493           <<: *functest-advcontainers-rmi
494       - multijob:
495           name: remove functest-tempest
496           condition: ALWAYS
497           projects:
498             - name: '{repo}-functest-tempest-{tag}-rmi'
499               <<: *functest-projectparameters
500       - multijob:
501           name: remove functest-core
502           condition: ALWAYS
503           projects:
504             - name: '{repo}-functest-core-{tag}-rmi'
505               <<: *functest-projectparameters
506       - multijob:
507           name: remove alpine
508           condition: ALWAYS
509           projects:
510             - name: 'alpine-rmi'
511               <<: *functest-projectparameters
512
513 - job-template:
514     name: '{repo}-functest-{tag}-check'
515     project-type: multijob
516     <<: *functest-checkparameters
517     properties:
518       - build-blocker:
519           use-build-blocker: true
520           block-level: 'NODE'
521           queue-scanning: 'BUILDABLE'
522           blocking-jobs:
523             - '{repo}-functest-.*-.*'
524     builders:
525       - multijob:
526           name: pull alpine
527           projects:
528             - name: 'alpine-pull'
529       - multijob:
530           name: build functest-core
531           projects:
532             - name: '{repo}-functest-core-{tag}-check'
533               <<: *functest-projectparameters
534       - multijob:
535           name: build functest-tempest
536           projects:
537             - name: '{repo}-functest-tempest-{tag}-check'
538               <<: *functest-projectparameters
539       - multijob:
540           name: build all remaining contrainers
541           projects:
542             - name: '{repo}-functest-healthcheck-{tag}-check'
543               <<: *functest-projectparameters
544             - name: '{repo}-functest-smoke-{tag}-check'
545               <<: *functest-projectparameters
546             - name: '{repo}-functest-benchmarking-{tag}-check'
547               <<: *functest-projectparameters
548             - name: '{repo}-functest-components-{tag}-check'
549               <<: *functest-projectparameters
550             - name: '{repo}-functest-vnf-{tag}-check'
551               <<: *functest-projectparameters
552             - name: '{repo}-functest-features-{tag}-check'
553               <<: *functest-projectparameters
554       - multijob:
555           name: run containers
556           condition: ALWAYS
557           projects:
558             - name: '{repo}-functest-{tag}-run'
559       - multijob:
560           name: remove advanced functest containers
561           condition: ALWAYS
562           <<: *functest-advcontainers-rmi
563       - multijob:
564           name: remove functest-tempest
565           condition: ALWAYS
566           projects:
567             - name: '{repo}-functest-tempest-{tag}-rmi'
568               <<: *functest-projectparameters
569       - multijob:
570           name: remove functest-core
571           condition: ALWAYS
572           projects:
573             - name: '{repo}-functest-core-{tag}-rmi'
574               <<: *functest-projectparameters
575       - multijob:
576           name: remove alpine
577           condition: ALWAYS
578           projects:
579             - name: 'alpine-rmi'
580               <<: *functest-projectparameters
581
582 - project:
583     name: repo-functest-tag-build
584     <<: *functest-defaultparameters
585     jobs:
586       - '{repo}-functest-{tag}-gate'
587       - '{repo}-functest-{tag}-check'