Fix trivy calls
[releng.git] / jjb / functest / functest-pi.yaml
1 ---
2 - functest-pi-containers: &functest-pi-containers
3     name: 'functest-pi-containers'
4     repo: '{repo}'
5     port: '{port}'
6     container: '{container}'
7     tag: '{tag}'
8
9 - functest-pi-params: &functest-pi-params
10     name: 'functest-pi-params'
11     repo: 'ollivier'
12     port:
13     tag:
14       - latest:
15           slave: lf-pod4-2
16           DASHBOARD_URL: http://172.30.12.85
17       - xena:
18           slave: laas-xena
19           DASHBOARD_URL: http://10.200.120.76
20       - wallaby:
21           slave: lf-virtual6
22           DASHBOARD_URL: http://172.30.13.91
23       - leguer:
24           slave: lf-virtual9
25           DASHBOARD_URL: http://172.30.13.94
26       - kali:
27           slave: lf-pod4-3
28           DASHBOARD_URL: http://172.30.12.88
29       - jerma:
30           slave: lf-pod4
31           DASHBOARD_URL: http://172.30.12.83
32       - arm-latest:
33           slave: lf-pod4-2
34           DASHBOARD_URL: http://172.30.12.85
35       - xena-latest:
36           slave: laas-xena
37           DASHBOARD_URL: http://10.200.120.76
38       - arm-wallaby:
39           slave: lf-virtual6
40           DASHBOARD_URL: http://172.30.13.91
41       - arm-leguer:
42           slave: lf-virtual9
43           DASHBOARD_URL: http://172.30.13.94
44       - arm-kali:
45           slave: lf-pod4-3
46           DASHBOARD_URL: http://172.30.12.88
47       - arm-jerma:
48           slave: lf-pod4
49           DASHBOARD_URL: http://172.30.12.83
50       - arm64-latest:
51           slave: lf-pod4-2
52           DASHBOARD_URL: http://172.30.12.85
53       - arm64-xena:
54           slave: laas-xena
55           DASHBOARD_URL: http://10.200.120.76
56       - arm64-wallaby:
57           slave: lf-virtual6
58           DASHBOARD_URL: http://172.30.13.91
59       - arm64-leguer:
60           slave: lf-virtual9
61           DASHBOARD_URL: http://172.30.13.94
62       - arm64-kali:
63           slave: lf-pod4-3
64           DASHBOARD_URL: http://172.30.12.88
65       - arm64-jerma:
66           slave: lf-pod4
67           DASHBOARD_URL: http://172.30.12.83
68
69 - functest-pi-jobs: &functest-pi-jobs
70     name: 'functest-pi-jobs'
71     current-parameters: true
72
73 - parameter:
74     name: functest-pi-slave
75     parameters:
76       - label:
77           name: slave
78           default: '{slave}'
79
80 - parameter:
81     name: functest-pi-build_tag
82     parameters:
83       - random-string:
84           name: build_tag
85
86 - parameter:
87     name: functest-pi-EXTERNAL_NETWORK
88     parameters:
89       - string:
90           name: EXTERNAL_NETWORK
91           default: public
92
93 - parameter:
94     name: functest-pi-VOLUME_DEVICE_NAME
95     parameters:
96       - string:
97           name: VOLUME_DEVICE_NAME
98           default: sdb
99
100 - parameter:
101     name: functest-pi-IMAGE_PROPERTIES
102     parameters:
103       - string:
104           name: IMAGE_PROPERTIES
105           default: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
106
107 - functest-pi-run-containers: &functest-pi-run-containers
108     name: 'functest-pi-run-containers'
109     <<: *functest-pi-containers
110     test: '{test}'
111     privileged: '{privileged}'
112     volumes: '{volumes}'
113     env: '{env}'
114     network: '{network}'
115     uid: '{uid}'
116     gid: '{gid}'
117     published_ports: '{published_ports}'
118     DASHBOARD_URL: '{DASHBOARD_URL}'
119
120 - builder:
121     name: functest-pi-pull-containers
122     builders:
123       - shell: |
124           set +x
125           if [ "{repo}" = "_" ]; then
126             image={container}:{tag}
127           elif [ "{port}" = "None" ]; then
128             image={repo}/{container}:{tag}
129           else
130             image={repo}:{port}/{container}:{tag}
131           fi
132           sudo docker pull $image
133
134 - builder:
135     name: functest-pi-run-containers
136     builders:
137       - shell: |
138           set +x
139           volumes=;
140           if [ "{volumes}" != "None" ]; then
141             for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
142               do volumes="-v $i $volumes"; done
143           fi
144           env=;
145           if [ "{env}" != "None" ]; then
146             for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
147               do env="-e $i $env"; done
148           fi
149           published_ports=;
150           if [ "{published_ports}" != "None" ]; then
151             for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
152               do published_ports="-p $i $published_ports"; done
153           fi
154           [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
155           if [ "{repo}" = "_" ]; then
156             image={container}:{tag}
157           elif [ "{port}" = "None" ]; then
158             image={repo}/{container}:{tag}
159           else
160             image={repo}:{port}/{container}:{tag}
161           fi
162           sudo mkdir -p $WORKSPACE/results
163           sudo chown {uid}:{gid} $WORKSPACE/results
164           sudo docker run --rm \
165             --privileged={privileged} \
166             --network={network} \
167             $volumes \
168             $env \
169             $published_ports \
170             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
171             -e S3_DST_URL=s3://artifacts.opnfv.org/functest/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
172             -e HTTP_DST_URL=http://artifacts.opnfv.org/functest/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
173             -v /home/opnfv/functest/.boto:/etc/boto.cfg \
174             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
175             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
176             -e NODE_NAME=$slave \
177             -e BUILD_TAG=$BUILD_TAG \
178             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
179             -e DASHBOARD_URL={DASHBOARD_URL} \
180             $image run_tests -t {test} -p -r
181
182 - builder:
183     name: functest-pi-remove-images
184     builders:
185       - shell: |
186           set +x
187           if [ "{repo}" = "_" ]; then
188             image={container}:{tag}
189           elif [ "{port}" = "None" ]; then
190             image={repo}/{container}:{tag}
191           else
192             image={repo}:{port}/{container}:{tag}
193           fi
194           sudo docker rmi $image || true
195
196 - job-template:
197     name: 'functest-pi-{repo}-{container}-{tag}-pull'
198     parameters:
199       - functest-pi-slave:
200           slave: '{slave}'
201     builders:
202       - functest-pi-pull-containers:
203           <<: *functest-pi-containers
204
205 - project:
206     name: 'functest-pi-ollivier-functest-healthcheck-pull'
207     <<: *functest-pi-params
208     container: 'functest-healthcheck'
209     jobs:
210       - 'functest-pi-{repo}-{container}-{tag}-pull'
211
212 - project:
213     name: 'functest-pi-ollivier-functest-smoke-pull'
214     <<: *functest-pi-params
215     container: 'functest-smoke'
216     jobs:
217       - 'functest-pi-{repo}-{container}-{tag}-pull'
218
219 - project:
220     name: 'functest-pi-ollivier-functest-smoke-cntt-pull'
221     <<: *functest-pi-params
222     container: 'functest-smoke-cntt'
223     jobs:
224       - 'functest-pi-{repo}-{container}-{tag}-pull'
225
226 - project:
227     name: 'functest-pi-ollivier-functest-benchmarking-pull'
228     <<: *functest-pi-params
229     container: 'functest-benchmarking'
230     jobs:
231       - 'functest-pi-{repo}-{container}-{tag}-pull'
232
233 - project:
234     name: 'functest-pi-ollivier-functest-benchmarking-cntt-pull'
235     <<: *functest-pi-params
236     container: 'functest-benchmarking-cntt'
237     jobs:
238       - 'functest-pi-{repo}-{container}-{tag}-pull'
239
240 - project:
241     name: 'functest-pi-ollivier-functest-vnf-pull'
242     <<: *functest-pi-params
243     container: 'functest-vnf'
244     jobs:
245       - 'functest-pi-{repo}-{container}-{tag}-pull'
246
247 - job-template:
248     name: 'functest-pi-{repo}-{container}-{tag}-rmi'
249     parameters:
250       - functest-pi-slave:
251           slave: '{slave}'
252     builders:
253       - functest-pi-remove-images:
254           <<: *functest-pi-containers
255
256 - project:
257     name: 'functest-pi-ollivier-functest-healthcheck-rmi'
258     <<: *functest-pi-params
259     container: 'functest-healthcheck'
260     jobs:
261       - 'functest-pi-{repo}-{container}-{tag}-rmi'
262
263 - project:
264     name: 'functest-pi-ollivier-functest-smoke-rmi'
265     <<: *functest-pi-params
266     container: 'functest-smoke'
267     jobs:
268       - 'functest-pi-{repo}-{container}-{tag}-rmi'
269
270 - project:
271     name: 'functest-pi-ollivier-functest-smoke-cntt-rmi'
272     <<: *functest-pi-params
273     container: 'functest-smoke-cntt'
274     jobs:
275       - 'functest-pi-{repo}-{container}-{tag}-rmi'
276
277 - project:
278     name: 'functest-pi-ollivier-functest-benchmarking-rmi'
279     <<: *functest-pi-params
280     container: 'functest-benchmarking'
281     jobs:
282       - 'functest-pi-{repo}-{container}-{tag}-rmi'
283
284 - project:
285     name: 'functest-pi-ollivier-functest-benchmarking-cntt-rmi'
286     <<: *functest-pi-params
287     container: 'functest-benchmarking-cntt'
288     jobs:
289       - 'functest-pi-{repo}-{container}-{tag}-rmi'
290
291 - project:
292     name: 'functest-pi-ollivier-functest-vnf-rmi'
293     <<: *functest-pi-params
294     container: 'functest-vnf'
295     jobs:
296       - 'functest-pi-{repo}-{container}-{tag}-rmi'
297
298 - job-template:
299     name: 'functest-pi-ollivier-functest-healthcheck-{tag}-{test}-run'
300     parameters:
301       - functest-pi-slave:
302           slave: '{slave}'
303       - functest-pi-build_tag:
304           build_tag: ''
305       - functest-pi-EXTERNAL_NETWORK:
306           EXTERNAL_NETWORK: public
307       - functest-pi-VOLUME_DEVICE_NAME:
308           VOLUME_DEVICE_NAME: sdb
309       - functest-pi-IMAGE_PROPERTIES:
310           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
311     builders:
312       - functest-pi-run-containers:
313           <<: *functest-pi-run-containers
314
315 - project:
316     name: 'functest-pi-ollivier-functest-healthcheck'
317     <<: *functest-pi-params
318     volumes:
319       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
320       - /home/opnfv/functest/images:/home/opnfv/functest/images
321     env:
322       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
323       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
324       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
325     published_ports:
326     container: 'functest-healthcheck'
327     test:
328       - connection_check
329       - tenantnetwork1
330       - tenantnetwork2
331       - vmready1
332       - vmready2
333       - singlevm1
334       - singlevm2
335       - vping_ssh
336       - vping_userdata
337       - cinder_test
338       - odl
339       - tempest_smoke
340       - tempest_horizon
341     privileged: 'false'
342     network: bridge
343     uid: 1000
344     gid: 1000
345     jobs:
346       - 'functest-pi-ollivier-functest-healthcheck-{tag}-{test}-run'
347
348 - job-template:
349     name: 'functest-pi-ollivier-functest-smoke-{tag}-{test}-run'
350     parameters:
351       - functest-pi-slave:
352           slave: '{slave}'
353       - functest-pi-build_tag:
354           build_tag: ''
355       - functest-pi-EXTERNAL_NETWORK:
356           EXTERNAL_NETWORK: public
357       - functest-pi-VOLUME_DEVICE_NAME:
358           VOLUME_DEVICE_NAME: sdb
359       - functest-pi-IMAGE_PROPERTIES:
360           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
361     builders:
362       - functest-pi-run-containers:
363           <<: *functest-pi-run-containers
364
365 - project:
366     name: 'functest-pi-ollivier-functest-smoke'
367     <<: *functest-pi-params
368     volumes:
369       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
370       - /home/opnfv/functest/images:/home/opnfv/functest/images
371     env:
372       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
373       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
374       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
375     published_ports:
376     container: 'functest-smoke'
377     test:
378       - tempest_neutron
379       - tempest_cinder
380       - tempest_keystone
381       - tempest_heat
382       - tempest_telemetry
383       - rally_sanity
384       - refstack_defcore
385       - refstack_compute
386       - refstack_object
387       - refstack_platform
388       - tempest_full
389       - tempest_scenario
390       - tempest_slow
391       - patrole
392       - patrole_admin
393       - patrole_member
394       - patrole_reader
395       - networking-bgpvpn
396       - networking-sfc
397       - tempest_barbican
398       - tempest_octavia
399       - tempest_cyborg
400     privileged: 'false'
401     network: bridge
402     uid: 1000
403     gid: 1000
404     exclude:
405       - tag: latest
406         test: refstack_defcore
407       - tag: latest
408         test: networking-bgpvpn
409       - tag: latest
410         test: networking-sfc
411       - tag: latest
412         test: patrole
413       - tag: xena
414         test: refstack_defcore
415       - tag: xena
416         test: networking-bgpvpn
417       - tag: xena
418         test: networking-sfc
419       - tag: xena
420         test: patrole
421       - tag: wallaby
422         test: refstack_defcore
423       - tag: wallaby
424         test: networking-bgpvpn
425       - tag: wallaby
426         test: networking-sfc
427       - tag: wallaby
428         test: patrole
429       - tag: leguer
430         test: refstack_defcore
431       - tag: leguer
432         test: networking-bgpvpn
433       - tag: leguer
434         test: networking-sfc
435       - tag: leguer
436         test: patrole
437       - tag: kali
438         test: refstack_defcore
439       - tag: kali
440         test: networking-bgpvpn
441       - tag: kali
442         test: networking-sfc
443       - tag: kali
444         test: patrole_admin
445       - tag: kali
446         test: patrole_member
447       - tag: kali
448         test: patrole_reader
449       - tag: jerma
450         test: refstack_defcore
451       - tag: jerma
452         test: networking-bgpvpn
453       - tag: jerma
454         test: networking-sfc
455       - tag: jerma
456         test: patrole_admin
457       - tag: jerma
458         test: patrole_member
459       - tag: jerma
460         test: patrole_reader
461       - tag: jerma
462         test: tempest_cyborg
463       - tag: arm-latest
464         test: refstack_defcore
465       - tag: arm-latest
466         test: networking-bgpvpn
467       - tag: arm-latest
468         test: networking-sfc
469       - tag: arm-latest
470         test: patrole
471       - tag: arm-xena
472         test: refstack_defcore
473       - tag: arm-xena
474         test: networking-bgpvpn
475       - tag: arm-xena
476         test: networking-sfc
477       - tag: arm-xena
478         test: patrole
479       - tag: arm-wallaby
480         test: refstack_defcore
481       - tag: arm-wallaby
482         test: networking-bgpvpn
483       - tag: arm-wallaby
484         test: networking-sfc
485       - tag: arm-wallaby
486         test: patrole
487       - tag: arm-leguer
488         test: refstack_defcore
489       - tag: arm-leguer
490         test: networking-bgpvpn
491       - tag: arm-leguer
492         test: networking-sfc
493       - tag: arm-leguer
494         test: patrole
495       - tag: arm-kali
496         test: refstack_defcore
497       - tag: arm-kali
498         test: networking-bgpvpn
499       - tag: arm-kali
500         test: networking-sfc
501       - tag: arm-kali
502         test: patrole_admin
503       - tag: arm-kali
504         test: patrole_member
505       - tag: arm-kali
506         test: patrole_reader
507       - tag: arm-jerma
508         test: refstack_defcore
509       - tag: arm-jerma
510         test: networking-bgpvpn
511       - tag: arm-jerma
512         test: networking-sfc
513       - tag: arm-jerma
514         test: patrole_admin
515       - tag: arm-jerma
516         test: patrole_member
517       - tag: arm-jerma
518         test: patrole_reader
519       - tag: arm-jerma
520         test: tempest_cyborg
521       - tag: arm64-latest
522         test: refstack_defcore
523       - tag: arm64-latest
524         test: networking-bgpvpn
525       - tag: arm64-latest
526         test: networking-sfc
527       - tag: arm64-latest
528         test: patrole
529       - tag: arm64-xena
530         test: refstack_defcore
531       - tag: arm64-xena
532         test: networking-bgpvpn
533       - tag: arm64-xena
534         test: networking-sfc
535       - tag: arm64-xena
536         test: patrole
537       - tag: arm64-wallaby
538         test: refstack_defcore
539       - tag: arm64-wallaby
540         test: networking-bgpvpn
541       - tag: arm64-wallaby
542         test: networking-sfc
543       - tag: arm64-wallaby
544         test: patrole
545       - tag: arm64-leguer
546         test: refstack_defcore
547       - tag: arm64-leguer
548         test: networking-bgpvpn
549       - tag: arm64-leguer
550         test: networking-sfc
551       - tag: arm64-leguer
552         test: patrole
553       - tag: arm64-kali
554         test: refstack_defcore
555       - tag: arm64-kali
556         test: networking-bgpvpn
557       - tag: arm64-kali
558         test: networking-sfc
559       - tag: arm64-kali
560         test: patrole_admin
561       - tag: arm64-kali
562         test: patrole_member
563       - tag: arm64-kali
564         test: patrole_reader
565       - tag: arm64-jerma
566         test: refstack_defcore
567       - tag: arm64-jerma
568         test: networking-bgpvpn
569       - tag: arm64-jerma
570         test: networking-sfc
571       - tag: arm64-jerma
572         test: patrole_admin
573       - tag: arm64-jerma
574         test: patrole_member
575       - tag: arm64-jerma
576         test: patrole_reader
577       - tag: arm64-jerma
578         test: tempest_cyborg
579     jobs:
580       - 'functest-pi-ollivier-functest-smoke-{tag}-{test}-run'
581
582 - job-template:
583     name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-{test}-run'
584     parameters:
585       - functest-pi-slave:
586           slave: '{slave}'
587       - functest-pi-build_tag:
588           build_tag: ''
589       - functest-pi-EXTERNAL_NETWORK:
590           EXTERNAL_NETWORK: public
591       - functest-pi-VOLUME_DEVICE_NAME:
592           VOLUME_DEVICE_NAME: sdb
593       - functest-pi-IMAGE_PROPERTIES:
594           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
595     builders:
596       - functest-pi-run-containers:
597           <<: *functest-pi-run-containers
598
599 - project:
600     name: 'functest-pi-ollivier-functest-smoke-cntt'
601     <<: *functest-pi-params
602     volumes:
603       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
604       - /home/opnfv/functest/images:/home/opnfv/functest/images
605     env:
606       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
607       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
608       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
609     published_ports:
610     container: 'functest-smoke-cntt'
611     test:
612       - tempest_neutron_cntt
613       - tempest_cinder_cntt
614       - tempest_keystone_cntt
615       - tempest_heat_cntt
616       - rally_sanity_cntt
617       - tempest_full_cntt
618       - tempest_scenario_cntt
619       - tempest_slow_cntt
620     privileged: 'false'
621     network: bridge
622     uid: 1000
623     gid: 1000
624     jobs:
625       - 'functest-pi-ollivier-functest-smoke-cntt-{tag}-{test}-run'
626
627 - job-template:
628     name: 'functest-pi-ollivier-functest-benchmarking-{tag}-{test}-run'
629     parameters:
630       - functest-pi-slave:
631           slave: '{slave}'
632       - functest-pi-build_tag:
633           build_tag: ''
634       - functest-pi-EXTERNAL_NETWORK:
635           EXTERNAL_NETWORK: public
636       - functest-pi-VOLUME_DEVICE_NAME:
637           VOLUME_DEVICE_NAME: sdb
638       - functest-pi-IMAGE_PROPERTIES:
639           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
640     builders:
641       - functest-pi-run-containers:
642           <<: *functest-pi-run-containers
643
644 - project:
645     name: 'functest-pi-ollivier-functest-benchmarking'
646     <<: *functest-pi-params
647     volumes:
648       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
649       - /home/opnfv/functest/images:/home/opnfv/functest/images
650     env:
651       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
652       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
653       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
654     published_ports:
655     container: 'functest-benchmarking'
656     test:
657       - rally_full
658       - rally_jobs
659       - vmtp
660       - shaker
661     privileged: 'false'
662     network: bridge
663     uid: 1000
664     gid: 1000
665     jobs:
666       - 'functest-pi-ollivier-functest-benchmarking-{tag}-{test}-run'
667
668 - job-template:
669     name: 'functest-pi-ollivier-functest-benchmarking-cntt-{tag}-{test}-run'
670     parameters:
671       - functest-pi-slave:
672           slave: '{slave}'
673       - functest-pi-build_tag:
674           build_tag: ''
675       - functest-pi-EXTERNAL_NETWORK:
676           EXTERNAL_NETWORK: public
677       - functest-pi-VOLUME_DEVICE_NAME:
678           VOLUME_DEVICE_NAME: sdb
679       - functest-pi-IMAGE_PROPERTIES:
680           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
681     builders:
682       - functest-pi-run-containers:
683           <<: *functest-pi-run-containers
684
685 - project:
686     name: 'functest-pi-ollivier-functest-benchmarking-cntt'
687     <<: *functest-pi-params
688     volumes:
689       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
690       - /home/opnfv/functest/images:/home/opnfv/functest/images
691     env:
692       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
693       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
694       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
695     published_ports:
696     container: 'functest-benchmarking-cntt'
697     test:
698       - rally_full_cntt
699       - rally_jobs_cntt
700     privileged: 'false'
701     network: bridge
702     uid: 1000
703     gid: 1000
704     jobs:
705       - 'functest-pi-ollivier-functest-benchmarking-cntt-{tag}-{test}-run'
706
707 - job-template:
708     name: 'functest-pi-ollivier-functest-vnf-{tag}-{test}-run'
709     parameters:
710       - functest-pi-slave:
711           slave: '{slave}'
712       - functest-pi-build_tag:
713           build_tag: ''
714       - functest-pi-EXTERNAL_NETWORK:
715           EXTERNAL_NETWORK: public
716       - functest-pi-VOLUME_DEVICE_NAME:
717           VOLUME_DEVICE_NAME: sdb
718       - functest-pi-IMAGE_PROPERTIES:
719           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
720     builders:
721       - functest-pi-run-containers:
722           <<: *functest-pi-run-containers
723
724 - project:
725     name: 'functest-pi-ollivier-functest-vnf'
726     <<: *functest-pi-params
727     volumes:
728       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
729       - /home/opnfv/functest/images:/home/opnfv/functest/images
730     env:
731       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
732       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
733       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
734     published_ports:
735     container: 'functest-vnf'
736     test:
737       - cloudify
738       - cloudify_ims
739       - heat_ims
740       - vyos_vrouter
741       - juju_epc
742     privileged: 'false'
743     network: bridge
744     uid: 1000
745     gid: 1000
746     jobs:
747       - 'functest-pi-ollivier-functest-vnf-{tag}-{test}-run'
748
749 - builder:
750     name: functest-pi-zip
751     builders:
752       - shell: |
753           set +x
754           volumes=;
755           if [ "{volumes}" != "None" ]; then
756             for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
757               do volumes="-v $i $volumes"; done
758           fi
759           env=;
760           if [ "{env}" != "None" ]; then
761             for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
762               do env="-e $i $env"; done
763           fi
764           published_ports=;
765           if [ "{published_ports}" != "None" ]; then
766             for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \
767               do published_ports="-p $i $published_ports"; done
768           fi
769           [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
770           if [ "{repo}" = "_" ]; then
771             image={container}:{tag}
772           elif [ "{port}" = "None" ]; then
773             image={repo}/{container}:{tag}
774           else
775             image={repo}:{port}/{container}:{tag}
776           fi
777           sudo mkdir -p $WORKSPACE/results
778           sudo chown {uid}:{gid} $WORKSPACE/results
779           sudo docker run --rm \
780             $volumes \
781             $env \
782             $published_ports \
783             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
784             -e S3_DST_URL=s3://artifacts.opnfv.org/functest \
785             -e HTTP_DST_URL=http://artifacts.opnfv.org/functest \
786             -v /home/opnfv/functest/.boto:/etc/boto.cfg \
787             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
788             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
789             -e BUILD_TAG=$BUILD_TAG \
790             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
791             $image zip_campaign
792
793 - job-template:
794     name: 'functest-pi-{tag}-zip'
795     parameters:
796       - functest-pi-slave:
797           slave: '{slave}'
798       - functest-pi-build_tag:
799           build_tag: ''
800       - functest-pi-EXTERNAL_NETWORK:
801           EXTERNAL_NETWORK: public
802       - functest-pi-VOLUME_DEVICE_NAME:
803           VOLUME_DEVICE_NAME: sdb
804       - functest-pi-IMAGE_PROPERTIES:
805           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
806     builders:
807       - functest-pi-zip:
808           <<: *functest-pi-containers
809           volumes: '{volumes}'
810           env: '{env}'
811           uid: '{uid}'
812           gid: '{gid}'
813           published_ports: '{published_ports}'
814
815 - project:
816     name: 'functest-pi-{tag}-zip'
817     <<: *functest-pi-params
818     volumes:
819       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
820       - /home/opnfv/functest/images:/home/opnfv/functest/images
821     env:
822       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
823       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
824       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
825     published_ports:
826     container: 'functest-healthcheck'
827     uid: 1000
828     gid: 1000
829     jobs:
830       - 'functest-pi-{tag}-zip'
831
832 - job-template:
833     name: 'functest-pi-{tag}-daily'
834     project-type: multijob
835     triggers:
836       - timed: '@weekly'
837     parameters:
838       - functest-pi-slave:
839           slave: '{slave}'
840       - functest-pi-build_tag:
841           build_tag: ''
842       - functest-pi-EXTERNAL_NETWORK:
843           EXTERNAL_NETWORK: public
844       - functest-pi-VOLUME_DEVICE_NAME:
845           VOLUME_DEVICE_NAME: sdb
846       - functest-pi-IMAGE_PROPERTIES:
847           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
848     # PyYAML and yamllint differ here
849     # see https://github.com/yaml/pyyaml/issues/234
850     # yamllint disable rule:indentation
851     properties:
852       - build-blocker:
853           blocking-jobs:
854           - ^functest-(pi-)*{tag}-(daily|docker|review)$
855     # yamllint enable rule:indentation
856     builders:
857       - multijob:
858           name: remove former images
859           projects:
860             - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-rmi'
861               <<: *functest-pi-jobs
862             - name: 'functest-pi-ollivier-functest-smoke-{tag}-rmi'
863               <<: *functest-pi-jobs
864             - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-rmi'
865               <<: *functest-pi-jobs
866             - name: 'functest-pi-ollivier-functest-benchmarking-{tag}-rmi'
867               <<: *functest-pi-jobs
868             - name: 'functest-pi-ollivier-functest-benchmarking-cntt-{tag}-rmi'
869               <<: *functest-pi-jobs
870             - name: 'functest-pi-ollivier-functest-vnf-{tag}-rmi'
871               <<: *functest-pi-jobs
872       - multijob:
873           name: pull containers
874           projects:
875             - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-pull'
876               <<: *functest-pi-jobs
877             - name: 'functest-pi-ollivier-functest-smoke-{tag}-pull'
878               <<: *functest-pi-jobs
879             - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-pull'
880               <<: *functest-pi-jobs
881             - name: 'functest-pi-ollivier-functest-benchmarking-{tag}-pull'
882               <<: *functest-pi-jobs
883             - name: 'functest-pi-ollivier-functest-benchmarking-cntt-{tag}-pull'
884               <<: *functest-pi-jobs
885             - name: 'functest-pi-ollivier-functest-vnf-{tag}-pull'
886               <<: *functest-pi-jobs
887       - multijob:
888           name: ollivier/functest-healthcheck:{tag}
889           projects:
890             - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-connection_check-run'
891               <<: *functest-pi-jobs
892             - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-tenantnetwork1-run'
893               <<: *functest-pi-jobs
894             - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-tenantnetwork2-run'
895               <<: *functest-pi-jobs
896             - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-vmready1-run'
897               <<: *functest-pi-jobs
898             - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-vmready2-run'
899               <<: *functest-pi-jobs
900             - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-singlevm1-run'
901               <<: *functest-pi-jobs
902             - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-singlevm2-run'
903               <<: *functest-pi-jobs
904             - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-vping_ssh-run'
905               <<: *functest-pi-jobs
906             - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-vping_userdata-run'
907               <<: *functest-pi-jobs
908             - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-cinder_test-run'
909               <<: *functest-pi-jobs
910             - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-odl-run'
911               <<: *functest-pi-jobs
912             - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-tempest_smoke-run'
913               <<: *functest-pi-jobs
914             - name: 'functest-pi-ollivier-functest-healthcheck-{tag}-tempest_horizon-run'
915               <<: *functest-pi-jobs
916       - multijob:
917           name: ollivier/functest-smoke:{tag}
918           projects:
919             - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_neutron-run'
920               <<: *functest-pi-jobs
921             - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_cinder-run'
922               <<: *functest-pi-jobs
923             - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_keystone-run'
924               <<: *functest-pi-jobs
925             - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_heat-run'
926               <<: *functest-pi-jobs
927             - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_telemetry-run'
928               <<: *functest-pi-jobs
929             - name: 'functest-pi-ollivier-functest-smoke-{tag}-rally_sanity-run'
930               <<: *functest-pi-jobs
931             - name: 'functest-pi-ollivier-functest-smoke-{tag}-refstack_defcore-run'
932               <<: *functest-pi-jobs
933             - name: 'functest-pi-ollivier-functest-smoke-{tag}-refstack_compute-run'
934               <<: *functest-pi-jobs
935             - name: 'functest-pi-ollivier-functest-smoke-{tag}-refstack_object-run'
936               <<: *functest-pi-jobs
937             - name: 'functest-pi-ollivier-functest-smoke-{tag}-refstack_platform-run'
938               <<: *functest-pi-jobs
939             - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_full-run'
940               <<: *functest-pi-jobs
941             - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_scenario-run'
942               <<: *functest-pi-jobs
943             - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_slow-run'
944               <<: *functest-pi-jobs
945             - name: 'functest-pi-ollivier-functest-smoke-{tag}-patrole-run'
946               <<: *functest-pi-jobs
947             - name: 'functest-pi-ollivier-functest-smoke-{tag}-patrole_admin-run'
948               <<: *functest-pi-jobs
949             - name: 'functest-pi-ollivier-functest-smoke-{tag}-patrole_member-run'
950               <<: *functest-pi-jobs
951             - name: 'functest-pi-ollivier-functest-smoke-{tag}-patrole_reader-run'
952               <<: *functest-pi-jobs
953             - name: 'functest-pi-ollivier-functest-smoke-{tag}-networking-bgpvpn-run'
954               <<: *functest-pi-jobs
955             - name: 'functest-pi-ollivier-functest-smoke-{tag}-networking-sfc-run'
956               <<: *functest-pi-jobs
957             - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_barbican-run'
958               <<: *functest-pi-jobs
959             - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_octavia-run'
960               <<: *functest-pi-jobs
961             - name: 'functest-pi-ollivier-functest-smoke-{tag}-tempest_cyborg-run'
962               <<: *functest-pi-jobs
963       - multijob:
964           name: ollivier/functest-smoke-cntt:{tag}
965           projects:
966             - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-tempest_neutron_cntt-run'
967               <<: *functest-pi-jobs
968             - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-tempest_cinder_cntt-run'
969               <<: *functest-pi-jobs
970             - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-tempest_keystone_cntt-run'
971               <<: *functest-pi-jobs
972             - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-tempest_heat_cntt-run'
973               <<: *functest-pi-jobs
974             - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-rally_sanity_cntt-run'
975               <<: *functest-pi-jobs
976             - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-tempest_full_cntt-run'
977               <<: *functest-pi-jobs
978             - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-tempest_scenario_cntt-run'
979               <<: *functest-pi-jobs
980             - name: 'functest-pi-ollivier-functest-smoke-cntt-{tag}-tempest_slow_cntt-run'
981               <<: *functest-pi-jobs
982       - multijob:
983           name: ollivier/functest-benchmarking:{tag}
984           projects:
985             - name: 'functest-pi-ollivier-functest-benchmarking-{tag}-rally_full-run'
986               <<: *functest-pi-jobs
987             - name: 'functest-pi-ollivier-functest-benchmarking-{tag}-rally_jobs-run'
988               <<: *functest-pi-jobs
989             - name: 'functest-pi-ollivier-functest-benchmarking-{tag}-vmtp-run'
990               <<: *functest-pi-jobs
991             - name: 'functest-pi-ollivier-functest-benchmarking-{tag}-shaker-run'
992               <<: *functest-pi-jobs
993       - multijob:
994           name: ollivier/functest-benchmarking-cntt:{tag}
995           projects:
996             - name: 'functest-pi-ollivier-functest-benchmarking-cntt-{tag}-rally_full_cntt-run'
997               <<: *functest-pi-jobs
998             - name: 'functest-pi-ollivier-functest-benchmarking-cntt-{tag}-rally_jobs_cntt-run'
999               <<: *functest-pi-jobs
1000       - multijob:
1001           name: ollivier/functest-vnf:{tag}
1002           projects:
1003             - name: 'functest-pi-ollivier-functest-vnf-{tag}-cloudify-run'
1004               <<: *functest-pi-jobs
1005             - name: 'functest-pi-ollivier-functest-vnf-{tag}-cloudify_ims-run'
1006               <<: *functest-pi-jobs
1007             - name: 'functest-pi-ollivier-functest-vnf-{tag}-heat_ims-run'
1008               <<: *functest-pi-jobs
1009             - name: 'functest-pi-ollivier-functest-vnf-{tag}-vyos_vrouter-run'
1010               <<: *functest-pi-jobs
1011             - name: 'functest-pi-ollivier-functest-vnf-{tag}-juju_epc-run'
1012               <<: *functest-pi-jobs
1013       - multijob:
1014           name: dump all campaign data
1015           projects:
1016             - name: 'functest-pi-{tag}-zip'
1017               <<: *functest-pi-jobs
1018     publishers:
1019       - email-ext:
1020           failure: false
1021           first-failure: true
1022           fixed: true
1023           recipients: cedric.ollivier@orange.com
1024
1025 - project:
1026     name: 'functest-pi-daily'
1027     <<: *functest-pi-params
1028     jobs:
1029       - 'functest-pi-{tag}-daily'
1030
1031 - view:
1032     name: functest-pi
1033     view-type: list
1034     columns:
1035       - status
1036       - weather
1037       - job
1038       - last-success
1039       - last-failure
1040       - last-duration
1041     regex: ^functest-pi-[a-z-0-9.]+-daily$