fd658c5b2bfbc015343be53b0a34626c0c205d63
[releng.git] / jjb / functest / functest.yaml
1 ---
2 - functest-containers: &functest-containers
3     name: 'functest-containers'
4     repo: '{repo}'
5     port: '{port}'
6     container: '{container}'
7     tag: '{tag}'
8
9 - functest-params: &functest-params
10     name: 'functest-params'
11     repo: 'opnfv'
12     port:
13     tag:
14       - latest:
15           from:
16           build_args:
17           branch: master
18           slave: lf-pod4-2
19           DASHBOARD_URL: http://172.30.12.85
20           dependency: 3.14
21       - wallaby:
22           from:
23           build_args:
24           branch: stable/wallaby
25           slave: lf-virtual6
26           DASHBOARD_URL: http://172.30.13.91
27           dependency: 3.13
28       - leguer:
29           from:
30           build_args:
31           branch: stable/leguer
32           slave: lf-virtual9
33           DASHBOARD_URL: http://172.30.13.94
34           dependency: 3.12
35       - kali:
36           from:
37           build_args:
38           branch: stable/kali
39           slave: lf-pod4-3
40           DASHBOARD_URL: http://172.30.12.88
41           dependency: 3.11
42       - jerma:
43           from:
44           build_args:
45           branch: stable/jerma
46           slave: lf-pod4
47           DASHBOARD_URL: http://172.30.12.83
48           dependency: 3.10
49
50 - functest-jobs: &functest-jobs
51     name: 'functest-jobs'
52     current-parameters: true
53
54 - parameter:
55     name: functest-slave
56     parameters:
57       - label:
58           name: slave
59           default: '{slave}'
60
61 - parameter:
62     name: functest-build_tag
63     parameters:
64       - random-string:
65           name: build_tag
66
67 - parameter:
68     name: functest-EXTERNAL_NETWORK
69     parameters:
70       - string:
71           name: EXTERNAL_NETWORK
72           default: public
73
74 - parameter:
75     name: functest-VOLUME_DEVICE_NAME
76     parameters:
77       - string:
78           name: VOLUME_DEVICE_NAME
79           default: sdb
80
81 - parameter:
82     name: functest-IMAGE_PROPERTIES
83     parameters:
84       - string:
85           name: IMAGE_PROPERTIES
86           default: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
87
88 - functest-run-containers: &functest-run-containers
89     name: 'functest-run-containers'
90     <<: *functest-containers
91     test: '{test}'
92     privileged: '{privileged}'
93     volumes: '{volumes}'
94     env: '{env}'
95     network: '{network}'
96     DASHBOARD_URL: '{DASHBOARD_URL}'
97
98 - builder:
99     name: functest-pull-containers
100     builders:
101       - shell: |
102           set +x
103           if [ "{repo}" = "_" ]; then
104             image={container}:{tag}
105           elif [ "{port}" = "None" ]; then
106             image={repo}/{container}:{tag}
107           else
108             image={repo}:{port}/{container}:{tag}
109           fi
110           sudo docker pull $image
111
112 - builder:
113     name: functest-run-containers
114     builders:
115       - shell: |
116           set +x
117           volumes=;
118           if [ "{volumes}" != "None" ]; then
119             for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
120               do volumes="-v $i $volumes"; done
121           fi
122           env=;
123           if [ "{env}" != "None" ]; then
124             for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
125               do env="-e $i $env"; done
126           fi
127           [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
128           if [ "{repo}" = "_" ]; then
129             image={container}:{tag}
130           elif [ "{port}" = "None" ]; then
131             image={repo}/{container}:{tag}
132           else
133             image={repo}:{port}/{container}:{tag}
134           fi
135           sudo docker run --rm \
136             --privileged={privileged} \
137             --network={network} \
138             $volumes \
139             $env \
140             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
141             -e S3_DST_URL=s3://artifacts.opnfv.org/functest/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
142             -e HTTP_DST_URL=http://artifacts.opnfv.org/functest/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
143             -v /home/opnfv/functest/.boto:/root/.boto \
144             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
145             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
146             -e NODE_NAME=$slave \
147             -e BUILD_TAG=$BUILD_TAG \
148             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
149             -e DASHBOARD_URL={DASHBOARD_URL} \
150             $image run_tests -t {test} -p -r
151
152 - builder:
153     name: functest-remove-images
154     builders:
155       - shell: |
156           set +x
157           if [ "{repo}" = "_" ]; then
158             image={container}:{tag}
159           elif [ "{port}" = "None" ]; then
160             image={repo}/{container}:{tag}
161           else
162             image={repo}:{port}/{container}:{tag}
163           fi
164           sudo docker rmi $image || true
165
166 - job-template:
167     name: 'functest-{repo}-{container}-{tag}-pull'
168     parameters:
169       - functest-slave:
170           slave: '{slave}'
171     builders:
172       - functest-pull-containers:
173           <<: *functest-containers
174
175 - project:
176     name: 'functest-opnfv-functest-healthcheck-pull'
177     <<: *functest-params
178     container: 'functest-healthcheck'
179     jobs:
180       - 'functest-{repo}-{container}-{tag}-pull'
181
182 - project:
183     name: 'functest-opnfv-functest-smoke-pull'
184     <<: *functest-params
185     container: 'functest-smoke'
186     jobs:
187       - 'functest-{repo}-{container}-{tag}-pull'
188
189 - project:
190     name: 'functest-opnfv-functest-smoke-cntt-pull'
191     <<: *functest-params
192     container: 'functest-smoke-cntt'
193     jobs:
194       - 'functest-{repo}-{container}-{tag}-pull'
195
196 - project:
197     name: 'functest-opnfv-functest-benchmarking-pull'
198     <<: *functest-params
199     container: 'functest-benchmarking'
200     jobs:
201       - 'functest-{repo}-{container}-{tag}-pull'
202
203 - project:
204     name: 'functest-opnfv-functest-benchmarking-cntt-pull'
205     <<: *functest-params
206     container: 'functest-benchmarking-cntt'
207     jobs:
208       - 'functest-{repo}-{container}-{tag}-pull'
209
210 - project:
211     name: 'functest-opnfv-functest-vnf-pull'
212     <<: *functest-params
213     container: 'functest-vnf'
214     jobs:
215       - 'functest-{repo}-{container}-{tag}-pull'
216
217 - job-template:
218     name: 'functest-{repo}-{container}-{tag}-rmi'
219     parameters:
220       - functest-slave:
221           slave: '{slave}'
222     builders:
223       - functest-remove-images:
224           <<: *functest-containers
225
226 - project:
227     name: 'functest-opnfv-functest-healthcheck-rmi'
228     <<: *functest-params
229     container: 'functest-healthcheck'
230     jobs:
231       - 'functest-{repo}-{container}-{tag}-rmi'
232
233 - project:
234     name: 'functest-opnfv-functest-smoke-rmi'
235     <<: *functest-params
236     container: 'functest-smoke'
237     jobs:
238       - 'functest-{repo}-{container}-{tag}-rmi'
239
240 - project:
241     name: 'functest-opnfv-functest-smoke-cntt-rmi'
242     <<: *functest-params
243     container: 'functest-smoke-cntt'
244     jobs:
245       - 'functest-{repo}-{container}-{tag}-rmi'
246
247 - project:
248     name: 'functest-opnfv-functest-benchmarking-rmi'
249     <<: *functest-params
250     container: 'functest-benchmarking'
251     jobs:
252       - 'functest-{repo}-{container}-{tag}-rmi'
253
254 - project:
255     name: 'functest-opnfv-functest-benchmarking-cntt-rmi'
256     <<: *functest-params
257     container: 'functest-benchmarking-cntt'
258     jobs:
259       - 'functest-{repo}-{container}-{tag}-rmi'
260
261 - project:
262     name: 'functest-opnfv-functest-vnf-rmi'
263     <<: *functest-params
264     container: 'functest-vnf'
265     jobs:
266       - 'functest-{repo}-{container}-{tag}-rmi'
267
268 - job-template:
269     name: 'functest-opnfv-functest-healthcheck-{tag}-{test}-run'
270     parameters:
271       - functest-slave:
272           slave: '{slave}'
273       - functest-build_tag:
274           build_tag: ''
275       - functest-EXTERNAL_NETWORK:
276           EXTERNAL_NETWORK: public
277       - functest-VOLUME_DEVICE_NAME:
278           VOLUME_DEVICE_NAME: sdb
279       - functest-IMAGE_PROPERTIES:
280           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
281     builders:
282       - functest-run-containers:
283           <<: *functest-run-containers
284
285 - project:
286     name: 'functest-opnfv-functest-healthcheck'
287     <<: *functest-params
288     volumes:
289       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
290       - /home/opnfv/functest/images:/home/opnfv/functest/images
291     env:
292       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
293       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
294       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
295     container: 'functest-healthcheck'
296     test:
297       - connection_check
298       - tenantnetwork1
299       - tenantnetwork2
300       - vmready1
301       - vmready2
302       - singlevm1
303       - singlevm2
304       - vping_ssh
305       - vping_userdata
306       - cinder_test
307       - odl
308       - tempest_smoke
309       - tempest_horizon
310     privileged: 'false'
311     network: bridge
312     jobs:
313       - 'functest-opnfv-functest-healthcheck-{tag}-{test}-run'
314
315 - job-template:
316     name: 'functest-opnfv-functest-smoke-{tag}-{test}-run'
317     parameters:
318       - functest-slave:
319           slave: '{slave}'
320       - functest-build_tag:
321           build_tag: ''
322       - functest-EXTERNAL_NETWORK:
323           EXTERNAL_NETWORK: public
324       - functest-VOLUME_DEVICE_NAME:
325           VOLUME_DEVICE_NAME: sdb
326       - functest-IMAGE_PROPERTIES:
327           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
328     builders:
329       - functest-run-containers:
330           <<: *functest-run-containers
331
332 - project:
333     name: 'functest-opnfv-functest-smoke'
334     <<: *functest-params
335     volumes:
336       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
337       - /home/opnfv/functest/images:/home/opnfv/functest/images
338     env:
339       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
340       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
341       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
342     container: 'functest-smoke'
343     test:
344       - tempest_neutron
345       - tempest_cinder
346       - tempest_keystone
347       - tempest_heat
348       - tempest_telemetry
349       - rally_sanity
350       - refstack_defcore
351       - refstack_compute
352       - refstack_object
353       - refstack_platform
354       - tempest_full
355       - tempest_scenario
356       - tempest_slow
357       - patrole
358       - patrole_admin
359       - patrole_member
360       - patrole_reader
361       - networking-bgpvpn
362       - networking-sfc
363       - tempest_barbican
364       - tempest_octavia
365       - tempest_cyborg
366     privileged: 'false'
367     network: bridge
368     exclude:
369       - tag: latest
370         test: refstack_defcore
371       - tag: latest
372         test: networking-bgpvpn
373       - tag: latest
374         test: networking-sfc
375       - tag: latest
376         test: patrole
377       - tag: wallaby
378         test: refstack_defcore
379       - tag: wallaby
380         test: networking-bgpvpn
381       - tag: wallaby
382         test: networking-sfc
383       - tag: wallaby
384         test: patrole
385       - tag: leguer
386         test: refstack_defcore
387       - tag: leguer
388         test: networking-bgpvpn
389       - tag: leguer
390         test: networking-sfc
391       - tag: leguer
392         test: patrole
393       - tag: kali
394         test: refstack_defcore
395       - tag: kali
396         test: networking-bgpvpn
397       - tag: kali
398         test: networking-sfc
399       - tag: kali
400         test: patrole_admin
401       - tag: kali
402         test: patrole_member
403       - tag: kali
404         test: patrole_reader
405       - tag: jerma
406         test: refstack_defcore
407       - tag: jerma
408         test: networking-bgpvpn
409       - tag: jerma
410         test: networking-sfc
411       - tag: jerma
412         test: patrole_admin
413       - tag: jerma
414         test: patrole_member
415       - tag: jerma
416         test: patrole_reader
417       - tag: jerma
418         test: tempest_cyborg
419     jobs:
420       - 'functest-opnfv-functest-smoke-{tag}-{test}-run'
421
422 - job-template:
423     name: 'functest-opnfv-functest-smoke-cntt-{tag}-{test}-run'
424     parameters:
425       - functest-slave:
426           slave: '{slave}'
427       - functest-build_tag:
428           build_tag: ''
429       - functest-EXTERNAL_NETWORK:
430           EXTERNAL_NETWORK: public
431       - functest-VOLUME_DEVICE_NAME:
432           VOLUME_DEVICE_NAME: sdb
433       - functest-IMAGE_PROPERTIES:
434           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
435     builders:
436       - functest-run-containers:
437           <<: *functest-run-containers
438
439 - project:
440     name: 'functest-opnfv-functest-smoke-cntt'
441     <<: *functest-params
442     volumes:
443       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
444       - /home/opnfv/functest/images:/home/opnfv/functest/images
445     env:
446       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
447       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
448       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
449     container: 'functest-smoke-cntt'
450     test:
451       - tempest_neutron_cntt
452       - tempest_cinder_cntt
453       - tempest_keystone_cntt
454       - tempest_heat_cntt
455       - rally_sanity_cntt
456       - tempest_full_cntt
457       - tempest_scenario_cntt
458       - tempest_slow_cntt
459     privileged: 'false'
460     network: bridge
461     jobs:
462       - 'functest-opnfv-functest-smoke-cntt-{tag}-{test}-run'
463
464 - job-template:
465     name: 'functest-opnfv-functest-benchmarking-{tag}-{test}-run'
466     parameters:
467       - functest-slave:
468           slave: '{slave}'
469       - functest-build_tag:
470           build_tag: ''
471       - functest-EXTERNAL_NETWORK:
472           EXTERNAL_NETWORK: public
473       - functest-VOLUME_DEVICE_NAME:
474           VOLUME_DEVICE_NAME: sdb
475       - functest-IMAGE_PROPERTIES:
476           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
477     builders:
478       - functest-run-containers:
479           <<: *functest-run-containers
480
481 - project:
482     name: 'functest-opnfv-functest-benchmarking'
483     <<: *functest-params
484     volumes:
485       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
486       - /home/opnfv/functest/images:/home/opnfv/functest/images
487     env:
488       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
489       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
490       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
491     container: 'functest-benchmarking'
492     test:
493       - rally_full
494       - rally_jobs
495       - vmtp
496       - shaker
497     privileged: 'false'
498     network: bridge
499     jobs:
500       - 'functest-opnfv-functest-benchmarking-{tag}-{test}-run'
501
502 - job-template:
503     name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-{test}-run'
504     parameters:
505       - functest-slave:
506           slave: '{slave}'
507       - functest-build_tag:
508           build_tag: ''
509       - functest-EXTERNAL_NETWORK:
510           EXTERNAL_NETWORK: public
511       - functest-VOLUME_DEVICE_NAME:
512           VOLUME_DEVICE_NAME: sdb
513       - functest-IMAGE_PROPERTIES:
514           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
515     builders:
516       - functest-run-containers:
517           <<: *functest-run-containers
518
519 - project:
520     name: 'functest-opnfv-functest-benchmarking-cntt'
521     <<: *functest-params
522     volumes:
523       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
524       - /home/opnfv/functest/images:/home/opnfv/functest/images
525     env:
526       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
527       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
528       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
529     container: 'functest-benchmarking-cntt'
530     test:
531       - rally_full_cntt
532       - rally_jobs_cntt
533     privileged: 'false'
534     network: bridge
535     jobs:
536       - 'functest-opnfv-functest-benchmarking-cntt-{tag}-{test}-run'
537
538 - job-template:
539     name: 'functest-opnfv-functest-vnf-{tag}-{test}-run'
540     parameters:
541       - functest-slave:
542           slave: '{slave}'
543       - functest-build_tag:
544           build_tag: ''
545       - functest-EXTERNAL_NETWORK:
546           EXTERNAL_NETWORK: public
547       - functest-VOLUME_DEVICE_NAME:
548           VOLUME_DEVICE_NAME: sdb
549       - functest-IMAGE_PROPERTIES:
550           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
551     builders:
552       - functest-run-containers:
553           <<: *functest-run-containers
554
555 - project:
556     name: 'functest-opnfv-functest-vnf'
557     <<: *functest-params
558     volumes:
559       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
560       - /home/opnfv/functest/images:/home/opnfv/functest/images
561     env:
562       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
563       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
564       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
565     container: 'functest-vnf'
566     test:
567       - cloudify
568       - cloudify_ims
569       - heat_ims
570       - vyos_vrouter
571       - juju_epc
572     privileged: 'false'
573     network: bridge
574     jobs:
575       - 'functest-opnfv-functest-vnf-{tag}-{test}-run'
576
577 - builder:
578     name: functest-zip
579     builders:
580       - shell: |
581           set +x
582           volumes=;
583           if [ "{volumes}" != "None" ]; then
584             for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \
585               do volumes="-v $i $volumes"; done
586           fi
587           env=;
588           if [ "{env}" != "None" ]; then
589             for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \
590               do env="-e $i $env"; done
591           fi
592           [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
593           if [ "{repo}" = "_" ]; then
594             image={container}:{tag}
595           elif [ "{port}" = "None" ]; then
596             image={repo}/{container}:{tag}
597           else
598             image={repo}:{port}/{container}:{tag}
599           fi
600           sudo docker run --rm \
601             $volumes \
602             $env \
603             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
604             -e S3_DST_URL=s3://artifacts.opnfv.org/functest \
605             -e HTTP_DST_URL=http://artifacts.opnfv.org/functest \
606             -v /home/opnfv/functest/.boto:/root/.boto \
607             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
608             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
609             -e BUILD_TAG=$BUILD_TAG \
610             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
611             $image zip_campaign
612
613 - job-template:
614     name: 'functest-{tag}-zip'
615     parameters:
616       - functest-slave:
617           slave: '{slave}'
618       - functest-build_tag:
619           build_tag: ''
620       - functest-EXTERNAL_NETWORK:
621           EXTERNAL_NETWORK: public
622       - functest-VOLUME_DEVICE_NAME:
623           VOLUME_DEVICE_NAME: sdb
624       - functest-IMAGE_PROPERTIES:
625           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
626     builders:
627       - functest-zip:
628           <<: *functest-containers
629           volumes: '{volumes}'
630           env: '{env}'
631
632 - project:
633     name: 'functest-{tag}-zip'
634     <<: *functest-params
635     volumes:
636       - /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file
637       - /home/opnfv/functest/images:/home/opnfv/functest/images
638     env:
639       - EXTERNAL_NETWORK=$EXTERNAL_NETWORK
640       - VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME
641       - IMAGE_PROPERTIES=$IMAGE_PROPERTIES
642     container: 'functest-healthcheck'
643     jobs:
644       - 'functest-{tag}-zip'
645
646 - job-template:
647     name: 'functest-{tag}-daily'
648     project-type: multijob
649     triggers:
650       - timed: '@weekly'
651     parameters:
652       - functest-slave:
653           slave: '{slave}'
654       - functest-build_tag:
655           build_tag: ''
656       - functest-EXTERNAL_NETWORK:
657           EXTERNAL_NETWORK: public
658       - functest-VOLUME_DEVICE_NAME:
659           VOLUME_DEVICE_NAME: sdb
660       - functest-IMAGE_PROPERTIES:
661           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
662     # PyYAML and yamllint differ here
663     # see https://github.com/yaml/pyyaml/issues/234
664     # yamllint disable rule:indentation
665     properties:
666       - build-blocker:
667           blocking-jobs:
668           - ^functest-(pi-)*{tag}-(daily|docker|review)$
669     # yamllint enable rule:indentation
670     builders:
671       - multijob:
672           name: remove former images
673           projects:
674             - name: 'functest-opnfv-functest-healthcheck-{tag}-rmi'
675               <<: *functest-jobs
676             - name: 'functest-opnfv-functest-smoke-{tag}-rmi'
677               <<: *functest-jobs
678             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rmi'
679               <<: *functest-jobs
680             - name: 'functest-opnfv-functest-benchmarking-{tag}-rmi'
681               <<: *functest-jobs
682             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rmi'
683               <<: *functest-jobs
684             - name: 'functest-opnfv-functest-vnf-{tag}-rmi'
685               <<: *functest-jobs
686       - multijob:
687           name: pull containers
688           projects:
689             - name: 'functest-opnfv-functest-healthcheck-{tag}-pull'
690               <<: *functest-jobs
691             - name: 'functest-opnfv-functest-smoke-{tag}-pull'
692               <<: *functest-jobs
693             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-pull'
694               <<: *functest-jobs
695             - name: 'functest-opnfv-functest-benchmarking-{tag}-pull'
696               <<: *functest-jobs
697             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-pull'
698               <<: *functest-jobs
699             - name: 'functest-opnfv-functest-vnf-{tag}-pull'
700               <<: *functest-jobs
701       - multijob:
702           name: opnfv/functest-healthcheck:{tag}
703           projects:
704             - name: 'functest-opnfv-functest-healthcheck-{tag}-connection_check-run'
705               <<: *functest-jobs
706             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork1-run'
707               <<: *functest-jobs
708             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork2-run'
709               <<: *functest-jobs
710             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready1-run'
711               <<: *functest-jobs
712             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready2-run'
713               <<: *functest-jobs
714             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm1-run'
715               <<: *functest-jobs
716             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm2-run'
717               <<: *functest-jobs
718             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_ssh-run'
719               <<: *functest-jobs
720             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_userdata-run'
721               <<: *functest-jobs
722             - name: 'functest-opnfv-functest-healthcheck-{tag}-cinder_test-run'
723               <<: *functest-jobs
724             - name: 'functest-opnfv-functest-healthcheck-{tag}-odl-run'
725               <<: *functest-jobs
726             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_smoke-run'
727               <<: *functest-jobs
728             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_horizon-run'
729               <<: *functest-jobs
730       - multijob:
731           name: opnfv/functest-smoke:{tag}
732           projects:
733             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_neutron-run'
734               <<: *functest-jobs
735             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cinder-run'
736               <<: *functest-jobs
737             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_keystone-run'
738               <<: *functest-jobs
739             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_heat-run'
740               <<: *functest-jobs
741             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_telemetry-run'
742               <<: *functest-jobs
743             - name: 'functest-opnfv-functest-smoke-{tag}-rally_sanity-run'
744               <<: *functest-jobs
745             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_defcore-run'
746               <<: *functest-jobs
747             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_compute-run'
748               <<: *functest-jobs
749             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_object-run'
750               <<: *functest-jobs
751             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_platform-run'
752               <<: *functest-jobs
753             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_full-run'
754               <<: *functest-jobs
755             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_scenario-run'
756               <<: *functest-jobs
757             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_slow-run'
758               <<: *functest-jobs
759             - name: 'functest-opnfv-functest-smoke-{tag}-patrole-run'
760               <<: *functest-jobs
761             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_admin-run'
762               <<: *functest-jobs
763             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_member-run'
764               <<: *functest-jobs
765             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_reader-run'
766               <<: *functest-jobs
767             - name: 'functest-opnfv-functest-smoke-{tag}-networking-bgpvpn-run'
768               <<: *functest-jobs
769             - name: 'functest-opnfv-functest-smoke-{tag}-networking-sfc-run'
770               <<: *functest-jobs
771             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_barbican-run'
772               <<: *functest-jobs
773             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_octavia-run'
774               <<: *functest-jobs
775             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cyborg-run'
776               <<: *functest-jobs
777       - multijob:
778           name: opnfv/functest-smoke-cntt:{tag}
779           projects:
780             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_neutron_cntt-run'
781               <<: *functest-jobs
782             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_cinder_cntt-run'
783               <<: *functest-jobs
784             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_keystone_cntt-run'
785               <<: *functest-jobs
786             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_heat_cntt-run'
787               <<: *functest-jobs
788             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rally_sanity_cntt-run'
789               <<: *functest-jobs
790             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_full_cntt-run'
791               <<: *functest-jobs
792             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_scenario_cntt-run'
793               <<: *functest-jobs
794             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_slow_cntt-run'
795               <<: *functest-jobs
796       - multijob:
797           name: opnfv/functest-benchmarking:{tag}
798           projects:
799             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_full-run'
800               <<: *functest-jobs
801             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_jobs-run'
802               <<: *functest-jobs
803             - name: 'functest-opnfv-functest-benchmarking-{tag}-vmtp-run'
804               <<: *functest-jobs
805             - name: 'functest-opnfv-functest-benchmarking-{tag}-shaker-run'
806               <<: *functest-jobs
807       - multijob:
808           name: opnfv/functest-benchmarking-cntt:{tag}
809           projects:
810             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_full_cntt-run'
811               <<: *functest-jobs
812             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_jobs_cntt-run'
813               <<: *functest-jobs
814       - multijob:
815           name: opnfv/functest-vnf:{tag}
816           projects:
817             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify-run'
818               <<: *functest-jobs
819             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify_ims-run'
820               <<: *functest-jobs
821             - name: 'functest-opnfv-functest-vnf-{tag}-heat_ims-run'
822               <<: *functest-jobs
823             - name: 'functest-opnfv-functest-vnf-{tag}-vyos_vrouter-run'
824               <<: *functest-jobs
825             - name: 'functest-opnfv-functest-vnf-{tag}-juju_epc-run'
826               <<: *functest-jobs
827       - multijob:
828           name: dump all campaign data
829           projects:
830             - name: 'functest-{tag}-zip'
831               <<: *functest-jobs
832
833 - project:
834     name: 'functest-daily'
835     <<: *functest-params
836     jobs:
837       - 'functest-{tag}-daily'
838
839 - view:
840     name: functest
841     view-type: list
842     columns:
843       - status
844       - weather
845       - job
846       - last-success
847       - last-failure
848       - last-duration
849     regex: ^functest-[a-z0-9.]+-daily$
850
851 - functest-build-containers: &functest-build-containers
852     name: 'functest-build-containers'
853     <<: *functest-containers
854     ref_arg: '{ref_arg}'
855     path: '{path}'
856     build_args: '{build_args}'
857     from: '{from}'
858
859 - builder:
860     name: functest-build-containers
861     builders:
862       - shell: |
863           set +x
864           if [ "{repo}" = "_" ]; then
865             image={container}:{tag}
866           elif [ "{port}" = "None" ]; then
867             image={repo}/{container}:{tag}
868           else
869             image={repo}:{port}/{container}:{tag}
870           fi
871           build_args=""
872           if [ "{build_args}" != "None" ]; then
873             for i in $(echo {build_args} | tr -d '[]' |sed "s/, / /g" ); \
874               do build_args="--build-arg $i $build_args"; done
875           fi
876           if [ "{ref_arg}" != "None" ]; then
877             build_args="$build_args --build-arg {ref_arg}={ref}"
878           fi
879           cd {path}
880           if [ "{from}" != "None" ]; then
881               sed -i {from} Dockerfile
882           fi
883           sudo docker build $build_args \
884             --pull=false --no-cache --force-rm=true \
885             -t $image .
886
887 - scm:
888     name: functest-scm
889     scm:
890       - git:
891           url: 'https://gerrit.opnfv.org/gerrit/functest'
892           refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*'
893           branches:
894             - '{ref}'
895
896 - functest-dep: &functest-dep
897     name: 'functest-containers'
898     repo: '{repo}'
899     port: '{port}'
900     tag: '{tag}'
901     dependency: '{dependency}'
902
903 - builder:
904     name: functest-pull-dep-images
905     builders:
906       - shell: |
907           set +x
908           if [ "_" = "_" ]; then
909             image=alpine:{dependency}
910           elif [ "None" = "None" ]; then
911             image=_/alpine:{dependency}
912           else
913             image=_:/alpine:{dependency}
914           fi
915           sudo docker pull $image || true
916
917 - builder:
918     name: functest-remove-dep-images
919     builders:
920       - shell: |
921           set +x
922           if [ "_" = "_" ]; then
923             image=alpine:{dependency}
924           elif [ "" = "None" ]; then
925             image=_/alpine:{dependency}
926           else
927             image=_:/alpine:{dependency}
928           fi
929           sudo docker rmi $image || true
930
931 - job-template:
932     name: 'functest-{repo}-{tag}-dep-pull'
933     parameters:
934       - functest-slave:
935           slave: '{slave}'
936     builders:
937       - functest-pull-dep-images:
938           <<: *functest-dep
939
940 - project:
941     name: 'functest-{repo}-{tag}-dep-pull'
942     <<: *functest-params
943     jobs:
944       - 'functest-{repo}-{tag}-dep-pull'
945
946 - job-template:
947     name: 'functest-{repo}-{tag}-dep-rmi'
948     parameters:
949       - functest-slave:
950           slave: '{slave}'
951     builders:
952       - functest-remove-dep-images:
953           <<: *functest-dep
954
955 - project:
956     name: 'functest-{repo}-{tag}-dep-rmi'
957     <<: *functest-params
958     jobs:
959       - 'functest-{repo}-{tag}-dep-rmi'
960
961 - builder:
962     name: functest-tox
963     builders:
964       - shell: |
965           set +x
966           sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive \
967           apt-get install software-properties-common gpg -y
968           sudo add-apt-repository -y ppa:deadsnakes/ppa
969           sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive \
970           apt-get install \
971             python3.9 python3.9-dev python3.9-distutils \
972             python3.8 python3.8-dev python3.8-distutils \
973             python3.7 python3.7-dev python3.6 python3.6-dev \
974             python python-dev python3-pip enchant -y
975           sudo pip3 install tox tox-pip-version
976
977           tox
978
979 - job-template:
980     name: 'functest-{tag}-tox'
981     scm:
982       - functest-scm:
983           ref: $GERRIT_REFSPEC
984     triggers:
985       - functest-patchset-created:
986           branch: '{branch}'
987     parameters:
988       - functest-slave:
989           slave: '{slave}'
990     builders:
991       - functest-tox:
992
993 - project:
994     name: functest-tox
995     <<: *functest-params
996     jobs:
997       - 'functest-{tag}-tox'
998
999 - job-template:
1000     name: 'functest-{repo}-{container}-{tag}-gate'
1001     parameters:
1002       - functest-slave:
1003           slave: '{slave}'
1004     scm:
1005       - functest-scm:
1006           ref: $GERRIT_REFSPEC
1007     builders:
1008       - functest-build-containers:
1009           <<: *functest-build-containers
1010           ref: $GERRIT_REFSPEC
1011           build_args: '{build_args}'
1012
1013 - project:
1014     name: functest-opnfv-functest-core-{tag}-gate
1015     <<: *functest-params
1016     container: functest-core
1017     ref_arg: BRANCH
1018     path: docker/core
1019     jobs:
1020       - 'functest-{repo}-{container}-{tag}-gate'
1021
1022 - project:
1023     name: functest-opnfv-functest-tempest-{tag}-gate
1024     <<: *functest-params
1025     container: functest-tempest
1026     ref_arg: BRANCH
1027     path: docker/tempest
1028     exclude:
1029       - {'tag': 'latest'}
1030       - {'tag': 'wallaby'}
1031       - {'tag': 'leguer'}
1032       - {'tag': 'kali'}
1033       - {'tag': 'jerma'}
1034     jobs:
1035       - 'functest-{repo}-{container}-{tag}-gate'
1036
1037 - project:
1038     name: functest-opnfv-functest-healthcheck-{tag}-gate
1039     <<: *functest-params
1040     container: functest-healthcheck
1041     ref_arg: BRANCH
1042     path: docker/healthcheck
1043     jobs:
1044       - 'functest-{repo}-{container}-{tag}-gate'
1045
1046 - project:
1047     name: functest-opnfv-functest-smoke-{tag}-gate
1048     <<: *functest-params
1049     container: functest-smoke
1050     ref_arg: BRANCH
1051     path: docker/smoke
1052     jobs:
1053       - 'functest-{repo}-{container}-{tag}-gate'
1054
1055 - project:
1056     name: functest-opnfv-functest-benchmarking-{tag}-gate
1057     <<: *functest-params
1058     container: functest-benchmarking
1059     ref_arg: BRANCH
1060     path: docker/benchmarking
1061     jobs:
1062       - 'functest-{repo}-{container}-{tag}-gate'
1063
1064 - project:
1065     name: functest-opnfv-functest-vnf-{tag}-gate
1066     <<: *functest-params
1067     container: functest-vnf
1068     ref_arg:
1069     path: docker/vnf
1070     jobs:
1071       - 'functest-{repo}-{container}-{tag}-gate'
1072
1073 - project:
1074     name: functest-opnfv-functest-smoke-cntt-{tag}-gate
1075     <<: *functest-params
1076     container: functest-smoke-cntt
1077     ref_arg: BRANCH
1078     path: docker/smoke-cntt
1079     jobs:
1080       - 'functest-{repo}-{container}-{tag}-gate'
1081
1082 - project:
1083     name: functest-opnfv-functest-benchmarking-cntt-{tag}-gate
1084     <<: *functest-params
1085     container: functest-benchmarking-cntt
1086     ref_arg: BRANCH
1087     path: docker/benchmarking-cntt
1088     jobs:
1089       - 'functest-{repo}-{container}-{tag}-gate'
1090
1091 - trigger:
1092     name: functest-patchset-created
1093     triggers:
1094       - gerrit:
1095           trigger-on:
1096             - patchset-created-event
1097             - comment-added-contains-event:
1098                 comment-contains-value: 'recheck'
1099             - comment-added-contains-event:
1100                 comment-contains-value: 'reverify'
1101           projects:
1102             - project-compare-type: 'ANT'
1103               project-pattern: 'functest'
1104               branches:
1105                 - branch-compare-type: 'ANT'
1106                   branch-pattern: '**/{branch}'
1107
1108 - job-template:
1109     name: 'functest-{tag}-review'
1110     project-type: multijob
1111     triggers:
1112       - functest-patchset-created:
1113           branch: '{branch}'
1114     parameters:
1115       - functest-slave:
1116           slave: '{slave}'
1117       - functest-build_tag:
1118           build_tag: ''
1119       - functest-EXTERNAL_NETWORK:
1120           EXTERNAL_NETWORK: public
1121       - functest-VOLUME_DEVICE_NAME:
1122           VOLUME_DEVICE_NAME: sdb
1123       - functest-IMAGE_PROPERTIES:
1124           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
1125     # PyYAML and yamllint differ here
1126     # see https://github.com/yaml/pyyaml/issues/234
1127     # yamllint disable rule:indentation
1128     properties:
1129       - build-blocker:
1130           blocking-jobs:
1131           - ^functest-(pi-)*{tag}-(daily|docker|review)$
1132     # yamllint enable rule:indentation
1133     builders:
1134       - multijob:
1135           name: remove former images
1136           projects:
1137             - name: 'functest-opnfv-functest-healthcheck-{tag}-rmi'
1138               <<: *functest-jobs
1139             - name: 'functest-opnfv-functest-smoke-{tag}-rmi'
1140               <<: *functest-jobs
1141             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rmi'
1142               <<: *functest-jobs
1143             - name: 'functest-opnfv-functest-benchmarking-{tag}-rmi'
1144               <<: *functest-jobs
1145             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rmi'
1146               <<: *functest-jobs
1147             - name: 'functest-opnfv-functest-vnf-{tag}-rmi'
1148               <<: *functest-jobs
1149       - multijob:
1150           name: remove dependency
1151           projects:
1152             - name: 'functest-{repo}-{tag}-dep-rmi'
1153               <<: *functest-jobs
1154       - multijob:
1155           name: pull dependency
1156           projects:
1157             - name: 'functest-{repo}-{tag}-dep-pull'
1158               <<: *functest-jobs
1159       - multijob:
1160           name: build opnfv/functest-core
1161           projects:
1162             - name: 'functest-opnfv-functest-core-{tag}-gate'
1163               <<: *functest-jobs
1164       - multijob:
1165           name: build opnfv/functest-tempest
1166           projects:
1167             - name: 'functest-opnfv-functest-tempest-{tag}-gate'
1168               <<: *functest-jobs
1169       - multijob:
1170           name: build containers
1171           projects:
1172             - name: 'functest-opnfv-functest-healthcheck-{tag}-gate'
1173               <<: *functest-jobs
1174             - name: 'functest-opnfv-functest-smoke-{tag}-gate'
1175               <<: *functest-jobs
1176             - name: 'functest-opnfv-functest-benchmarking-{tag}-gate'
1177               <<: *functest-jobs
1178             - name: 'functest-opnfv-functest-vnf-{tag}-gate'
1179               <<: *functest-jobs
1180       - multijob:
1181           name: build cntt containers
1182           projects:
1183             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-gate'
1184               <<: *functest-jobs
1185             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-gate'
1186               <<: *functest-jobs
1187       - multijob:
1188           name: opnfv/functest-healthcheck:{tag}
1189           projects:
1190             - name: 'functest-opnfv-functest-healthcheck-{tag}-connection_check-run'
1191               <<: *functest-jobs
1192             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork1-run'
1193               <<: *functest-jobs
1194             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork2-run'
1195               <<: *functest-jobs
1196             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready1-run'
1197               <<: *functest-jobs
1198             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready2-run'
1199               <<: *functest-jobs
1200             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm1-run'
1201               <<: *functest-jobs
1202             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm2-run'
1203               <<: *functest-jobs
1204             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_ssh-run'
1205               <<: *functest-jobs
1206             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_userdata-run'
1207               <<: *functest-jobs
1208             - name: 'functest-opnfv-functest-healthcheck-{tag}-cinder_test-run'
1209               <<: *functest-jobs
1210             - name: 'functest-opnfv-functest-healthcheck-{tag}-odl-run'
1211               <<: *functest-jobs
1212             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_smoke-run'
1213               <<: *functest-jobs
1214             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_horizon-run'
1215               <<: *functest-jobs
1216       - multijob:
1217           name: opnfv/functest-smoke:{tag}
1218           projects:
1219             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_neutron-run'
1220               <<: *functest-jobs
1221             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cinder-run'
1222               <<: *functest-jobs
1223             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_keystone-run'
1224               <<: *functest-jobs
1225             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_heat-run'
1226               <<: *functest-jobs
1227             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_telemetry-run'
1228               <<: *functest-jobs
1229             - name: 'functest-opnfv-functest-smoke-{tag}-rally_sanity-run'
1230               <<: *functest-jobs
1231             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_defcore-run'
1232               <<: *functest-jobs
1233             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_compute-run'
1234               <<: *functest-jobs
1235             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_object-run'
1236               <<: *functest-jobs
1237             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_platform-run'
1238               <<: *functest-jobs
1239             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_full-run'
1240               <<: *functest-jobs
1241             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_scenario-run'
1242               <<: *functest-jobs
1243             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_slow-run'
1244               <<: *functest-jobs
1245             - name: 'functest-opnfv-functest-smoke-{tag}-patrole-run'
1246               <<: *functest-jobs
1247             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_admin-run'
1248               <<: *functest-jobs
1249             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_member-run'
1250               <<: *functest-jobs
1251             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_reader-run'
1252               <<: *functest-jobs
1253             - name: 'functest-opnfv-functest-smoke-{tag}-networking-bgpvpn-run'
1254               <<: *functest-jobs
1255             - name: 'functest-opnfv-functest-smoke-{tag}-networking-sfc-run'
1256               <<: *functest-jobs
1257             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_barbican-run'
1258               <<: *functest-jobs
1259             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_octavia-run'
1260               <<: *functest-jobs
1261             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cyborg-run'
1262               <<: *functest-jobs
1263       - multijob:
1264           name: opnfv/functest-smoke-cntt:{tag}
1265           projects:
1266             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_neutron_cntt-run'
1267               <<: *functest-jobs
1268             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_cinder_cntt-run'
1269               <<: *functest-jobs
1270             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_keystone_cntt-run'
1271               <<: *functest-jobs
1272             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_heat_cntt-run'
1273               <<: *functest-jobs
1274             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rally_sanity_cntt-run'
1275               <<: *functest-jobs
1276             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_full_cntt-run'
1277               <<: *functest-jobs
1278             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_scenario_cntt-run'
1279               <<: *functest-jobs
1280             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_slow_cntt-run'
1281               <<: *functest-jobs
1282       - multijob:
1283           name: opnfv/functest-benchmarking:{tag}
1284           projects:
1285             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_full-run'
1286               <<: *functest-jobs
1287             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_jobs-run'
1288               <<: *functest-jobs
1289             - name: 'functest-opnfv-functest-benchmarking-{tag}-vmtp-run'
1290               <<: *functest-jobs
1291             - name: 'functest-opnfv-functest-benchmarking-{tag}-shaker-run'
1292               <<: *functest-jobs
1293       - multijob:
1294           name: opnfv/functest-benchmarking-cntt:{tag}
1295           projects:
1296             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_full_cntt-run'
1297               <<: *functest-jobs
1298             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_jobs_cntt-run'
1299               <<: *functest-jobs
1300       - multijob:
1301           name: opnfv/functest-vnf:{tag}
1302           projects:
1303             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify-run'
1304               <<: *functest-jobs
1305             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify_ims-run'
1306               <<: *functest-jobs
1307             - name: 'functest-opnfv-functest-vnf-{tag}-heat_ims-run'
1308               <<: *functest-jobs
1309             - name: 'functest-opnfv-functest-vnf-{tag}-vyos_vrouter-run'
1310               <<: *functest-jobs
1311             - name: 'functest-opnfv-functest-vnf-{tag}-juju_epc-run'
1312               <<: *functest-jobs
1313
1314 - project:
1315     name: 'functest-review'
1316     <<: *functest-params
1317     jobs:
1318       - 'functest-{tag}-review'
1319
1320 - view:
1321     name: functest-review
1322     view-type: list
1323     columns:
1324       - status
1325       - weather
1326       - job
1327       - last-success
1328       - last-failure
1329       - last-duration
1330     regex: ^functest-[a-z0-9.]+-review$
1331
1332 - view:
1333     name: functest-tox
1334     view-type: list
1335     columns:
1336       - status
1337       - weather
1338       - job
1339       - last-success
1340       - last-failure
1341       - last-duration
1342     regex: ^functest-[a-z0-9.]+-tox$
1343
1344 - builder:
1345     name: functest-push-containers
1346     builders:
1347       - shell: |
1348           set +x
1349           if [ "{repo}" = "_" ]; then
1350             image={container}:{tag}
1351           elif [ "{port}" = "None" ]; then
1352             image={repo}/{container}:{tag}
1353           else
1354             image={repo}:{port}/{container}:{tag}
1355           fi
1356           sudo docker push $image
1357
1358 - trigger:
1359     name: functest-commit
1360     triggers:
1361       - pollscm:
1362           cron: "*/30 * * * *"
1363
1364 - job-template:
1365     name: 'functest-{repo}-{container}-{tag}-build'
1366     parameters:
1367       - functest-slave:
1368           slave: '{slave}'
1369     scm:
1370       - functest-scm:
1371           ref: '{branch}'
1372     builders:
1373       - functest-build-containers:
1374           <<: *functest-build-containers
1375           ref: '{branch}'
1376           build_args: '{build_args}'
1377       - functest-push-containers:
1378           <<: *functest-build-containers
1379           ref: '{branch}'
1380
1381 - project:
1382     name: functest-opnfv-functest-core-{tag}-build
1383     <<: *functest-params
1384     container: functest-core
1385     ref_arg: BRANCH
1386     path: docker/core
1387     jobs:
1388       - 'functest-{repo}-{container}-{tag}-build'
1389
1390 - project:
1391     name: functest-opnfv-functest-tempest-{tag}-build
1392     <<: *functest-params
1393     container: functest-tempest
1394     ref_arg: BRANCH
1395     path: docker/tempest
1396     exclude:
1397       - {'tag': 'latest'}
1398       - {'tag': 'wallaby'}
1399       - {'tag': 'leguer'}
1400       - {'tag': 'kali'}
1401       - {'tag': 'jerma'}
1402     jobs:
1403       - 'functest-{repo}-{container}-{tag}-build'
1404
1405 - project:
1406     name: functest-opnfv-functest-healthcheck-{tag}-build
1407     <<: *functest-params
1408     container: functest-healthcheck
1409     ref_arg: BRANCH
1410     path: docker/healthcheck
1411     jobs:
1412       - 'functest-{repo}-{container}-{tag}-build'
1413
1414 - project:
1415     name: functest-opnfv-functest-smoke-{tag}-build
1416     <<: *functest-params
1417     container: functest-smoke
1418     ref_arg: BRANCH
1419     path: docker/smoke
1420     jobs:
1421       - 'functest-{repo}-{container}-{tag}-build'
1422
1423 - project:
1424     name: functest-opnfv-functest-benchmarking-{tag}-build
1425     <<: *functest-params
1426     container: functest-benchmarking
1427     ref_arg: BRANCH
1428     path: docker/benchmarking
1429     jobs:
1430       - 'functest-{repo}-{container}-{tag}-build'
1431
1432 - project:
1433     name: functest-opnfv-functest-vnf-{tag}-build
1434     <<: *functest-params
1435     container: functest-vnf
1436     ref_arg:
1437     path: docker/vnf
1438     jobs:
1439       - 'functest-{repo}-{container}-{tag}-build'
1440
1441 - project:
1442     name: functest-opnfv-functest-smoke-cntt-{tag}-build
1443     <<: *functest-params
1444     container: functest-smoke-cntt
1445     ref_arg: BRANCH
1446     path: docker/smoke-cntt
1447     jobs:
1448       - 'functest-{repo}-{container}-{tag}-build'
1449
1450 - project:
1451     name: functest-opnfv-functest-benchmarking-cntt-{tag}-build
1452     <<: *functest-params
1453     container: functest-benchmarking-cntt
1454     ref_arg: BRANCH
1455     path: docker/benchmarking-cntt
1456     jobs:
1457       - 'functest-{repo}-{container}-{tag}-build'
1458
1459 - job-template:
1460     name: 'functest-{tag}-docker'
1461     project-type: multijob
1462     triggers:
1463       - functest-commit
1464     scm:
1465       - functest-scm:
1466           ref: '{branch}'
1467     parameters:
1468       - functest-slave:
1469           slave: '{slave}'
1470     # PyYAML and yamllint differ here
1471     # see https://github.com/yaml/pyyaml/issues/234
1472     # yamllint disable rule:indentation
1473     properties:
1474       - build-blocker:
1475           blocking-jobs:
1476           - ^functest-(pi-)*{tag}-(daily|docker|review)$
1477     # yamllint enable rule:indentation
1478     builders:
1479       - multijob:
1480           name: remove dependency
1481           projects:
1482             - name: 'functest-{repo}-{tag}-dep-rmi'
1483               <<: *functest-jobs
1484       - multijob:
1485           name: pull dependency
1486           projects:
1487             - name: 'functest-{repo}-{tag}-dep-pull'
1488               <<: *functest-jobs
1489       - multijob:
1490           name: build opnfv/functest-core
1491           projects:
1492             - name: 'functest-opnfv-functest-core-{tag}-build'
1493               <<: *functest-jobs
1494       - multijob:
1495           name: build opnfv/functest-tempest
1496           projects:
1497             - name: 'functest-opnfv-functest-tempest-{tag}-build'
1498               <<: *functest-jobs
1499       - multijob:
1500           name: build containers
1501           projects:
1502             - name: 'functest-opnfv-functest-healthcheck-{tag}-build'
1503               <<: *functest-jobs
1504             - name: 'functest-opnfv-functest-smoke-{tag}-build'
1505               <<: *functest-jobs
1506             - name: 'functest-opnfv-functest-benchmarking-{tag}-build'
1507               <<: *functest-jobs
1508             - name: 'functest-opnfv-functest-vnf-{tag}-build'
1509               <<: *functest-jobs
1510       - multijob:
1511           name: build cntt containers
1512           projects:
1513             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-build'
1514               <<: *functest-jobs
1515             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-build'
1516               <<: *functest-jobs
1517
1518 - builder:
1519     name: functest-trivy
1520     builders:
1521       - shell: |
1522           sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive \
1523           apt-get install curl -y
1524
1525           curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b .
1526           if [ "{repo}" = "_" ]; then
1527             image={container}:{tag}
1528           elif [ "{port}" = "None" ]; then
1529             image={repo}/{container}:{tag}
1530           else
1531             image={repo}:{port}/{container}:{tag}
1532           fi
1533           ./trivy --exit-code 1 $image
1534
1535 - job-template:
1536     name: 'functest-{repo}-{container}-{tag}-trivy'
1537     triggers:
1538       - timed: '@weekly'
1539     parameters:
1540       - functest-slave:
1541           slave: '{slave}'
1542     builders:
1543       - functest-trivy:
1544           <<: *functest-containers
1545
1546 - project:
1547     name: 'functest-opnfv-functest-core-trivy'
1548     <<: *functest-params
1549     container: 'functest-core'
1550     jobs:
1551       - 'functest-{repo}-{container}-{tag}-trivy'
1552
1553 - project:
1554     name: 'functest-opnfv-functest-tempest-trivy'
1555     <<: *functest-params
1556     container: 'functest-tempest'
1557     jobs:
1558       - 'functest-{repo}-{container}-{tag}-trivy'
1559
1560 - project:
1561     name: 'functest-opnfv-functest-healthcheck-trivy'
1562     <<: *functest-params
1563     container: 'functest-healthcheck'
1564     jobs:
1565       - 'functest-{repo}-{container}-{tag}-trivy'
1566
1567 - project:
1568     name: 'functest-opnfv-functest-smoke-trivy'
1569     <<: *functest-params
1570     container: 'functest-smoke'
1571     jobs:
1572       - 'functest-{repo}-{container}-{tag}-trivy'
1573
1574 - project:
1575     name: 'functest-opnfv-functest-benchmarking-trivy'
1576     <<: *functest-params
1577     container: 'functest-benchmarking'
1578     jobs:
1579       - 'functest-{repo}-{container}-{tag}-trivy'
1580
1581 - project:
1582     name: 'functest-opnfv-functest-vnf-trivy'
1583     <<: *functest-params
1584     container: 'functest-vnf'
1585     jobs:
1586       - 'functest-{repo}-{container}-{tag}-trivy'
1587
1588 - project:
1589     name: 'functest-opnfv-functest-smoke-cntt-trivy'
1590     <<: *functest-params
1591     container: 'functest-smoke-cntt'
1592     jobs:
1593       - 'functest-{repo}-{container}-{tag}-trivy'
1594
1595 - project:
1596     name: 'functest-opnfv-functest-benchmarking-cntt-trivy'
1597     <<: *functest-params
1598     container: 'functest-benchmarking-cntt'
1599     jobs:
1600       - 'functest-{repo}-{container}-{tag}-trivy'
1601
1602 - project:
1603     name: 'functest'
1604     <<: *functest-params
1605     jobs:
1606       - 'functest-{tag}-docker'
1607
1608 - view:
1609     name: functest-docker
1610     view-type: list
1611     columns:
1612       - status
1613       - weather
1614       - job
1615       - last-success
1616       - last-failure
1617       - last-duration
1618     regex: ^functest-[a-z0-9.]+-docker$
1619
1620 - view:
1621     name: functest-trivy
1622     view-type: list
1623     columns:
1624       - status
1625       - weather
1626       - job
1627       - last-success
1628       - last-failure
1629       - last-duration
1630     regex: (?!functest-kubernetes)(?!functest-pi)^functest-[a-z-0-9.]+-trivy$