Take last XtestingCI updates into account
[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           export EXTERNAL_NETWORK=public
967           export VOLUME_DEVICE_NAME=sdb
968           export IMAGE_PROPERTIES=hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
969           sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive \
970           apt-get install software-properties-common gpg -y
971           sudo add-apt-repository -y ppa:deadsnakes/ppa
972           sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive \
973           apt-get install \
974             python3.9 python3.9-dev python3.9-distutils \
975             python3.8 python3.8-dev python3.8-distutils \
976             python3.7 python3.7-dev python3.6 python3.6-dev \
977             python python-dev python3-pip enchant -y
978           sudo pip3 install tox tox-pip-version
979
980           tox
981
982 - job-template:
983     name: 'functest-{tag}-tox'
984     scm:
985       - functest-scm:
986           ref: $GERRIT_REFSPEC
987     triggers:
988       - functest-patchset-created:
989           branch: '{branch}'
990     parameters:
991       - functest-slave:
992           slave: '{slave}'
993     builders:
994       - functest-tox:
995
996 - project:
997     name: functest-tox
998     <<: *functest-params
999     jobs:
1000       - 'functest-{tag}-tox'
1001
1002 - job-template:
1003     name: 'functest-{repo}-{container}-{tag}-gate'
1004     parameters:
1005       - functest-slave:
1006           slave: '{slave}'
1007     scm:
1008       - functest-scm:
1009           ref: $GERRIT_REFSPEC
1010     builders:
1011       - functest-build-containers:
1012           <<: *functest-build-containers
1013           ref: $GERRIT_REFSPEC
1014           build_args: '{build_args}'
1015
1016 - project:
1017     name: functest-opnfv-functest-core-{tag}-gate
1018     <<: *functest-params
1019     container: functest-core
1020     ref_arg: BRANCH
1021     path: docker/core
1022     jobs:
1023       - 'functest-{repo}-{container}-{tag}-gate'
1024
1025 - project:
1026     name: functest-opnfv-functest-tempest-{tag}-gate
1027     <<: *functest-params
1028     container: functest-tempest
1029     ref_arg: BRANCH
1030     path: docker/tempest
1031     exclude:
1032       - {'tag': 'latest'}
1033       - {'tag': 'wallaby'}
1034       - {'tag': 'leguer'}
1035       - {'tag': 'kali'}
1036       - {'tag': 'jerma'}
1037     jobs:
1038       - 'functest-{repo}-{container}-{tag}-gate'
1039
1040 - project:
1041     name: functest-opnfv-functest-healthcheck-{tag}-gate
1042     <<: *functest-params
1043     container: functest-healthcheck
1044     ref_arg: BRANCH
1045     path: docker/healthcheck
1046     jobs:
1047       - 'functest-{repo}-{container}-{tag}-gate'
1048
1049 - project:
1050     name: functest-opnfv-functest-smoke-{tag}-gate
1051     <<: *functest-params
1052     container: functest-smoke
1053     ref_arg: BRANCH
1054     path: docker/smoke
1055     jobs:
1056       - 'functest-{repo}-{container}-{tag}-gate'
1057
1058 - project:
1059     name: functest-opnfv-functest-benchmarking-{tag}-gate
1060     <<: *functest-params
1061     container: functest-benchmarking
1062     ref_arg: BRANCH
1063     path: docker/benchmarking
1064     jobs:
1065       - 'functest-{repo}-{container}-{tag}-gate'
1066
1067 - project:
1068     name: functest-opnfv-functest-vnf-{tag}-gate
1069     <<: *functest-params
1070     container: functest-vnf
1071     ref_arg:
1072     path: docker/vnf
1073     jobs:
1074       - 'functest-{repo}-{container}-{tag}-gate'
1075
1076 - project:
1077     name: functest-opnfv-functest-smoke-cntt-{tag}-gate
1078     <<: *functest-params
1079     container: functest-smoke-cntt
1080     ref_arg: BRANCH
1081     path: docker/smoke-cntt
1082     jobs:
1083       - 'functest-{repo}-{container}-{tag}-gate'
1084
1085 - project:
1086     name: functest-opnfv-functest-benchmarking-cntt-{tag}-gate
1087     <<: *functest-params
1088     container: functest-benchmarking-cntt
1089     ref_arg: BRANCH
1090     path: docker/benchmarking-cntt
1091     jobs:
1092       - 'functest-{repo}-{container}-{tag}-gate'
1093
1094 - trigger:
1095     name: functest-patchset-created
1096     triggers:
1097       - gerrit:
1098           trigger-on:
1099             - patchset-created-event
1100             - comment-added-contains-event:
1101                 comment-contains-value: 'recheck'
1102             - comment-added-contains-event:
1103                 comment-contains-value: 'reverify'
1104           projects:
1105             - project-compare-type: 'ANT'
1106               project-pattern: 'functest'
1107               branches:
1108                 - branch-compare-type: 'ANT'
1109                   branch-pattern: '**/{branch}'
1110
1111 - job-template:
1112     name: 'functest-{tag}-review'
1113     project-type: multijob
1114     triggers:
1115       - functest-patchset-created:
1116           branch: '{branch}'
1117     parameters:
1118       - functest-slave:
1119           slave: '{slave}'
1120       - functest-build_tag:
1121           build_tag: ''
1122       - functest-EXTERNAL_NETWORK:
1123           EXTERNAL_NETWORK: public
1124       - functest-VOLUME_DEVICE_NAME:
1125           VOLUME_DEVICE_NAME: sdb
1126       - functest-IMAGE_PROPERTIES:
1127           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
1128     # PyYAML and yamllint differ here
1129     # see https://github.com/yaml/pyyaml/issues/234
1130     # yamllint disable rule:indentation
1131     properties:
1132       - build-blocker:
1133           blocking-jobs:
1134           - ^functest-(pi-)*{tag}-(daily|docker|review)$
1135     # yamllint enable rule:indentation
1136     builders:
1137       - multijob:
1138           name: remove former images
1139           projects:
1140             - name: 'functest-opnfv-functest-healthcheck-{tag}-rmi'
1141               <<: *functest-jobs
1142             - name: 'functest-opnfv-functest-smoke-{tag}-rmi'
1143               <<: *functest-jobs
1144             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rmi'
1145               <<: *functest-jobs
1146             - name: 'functest-opnfv-functest-benchmarking-{tag}-rmi'
1147               <<: *functest-jobs
1148             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rmi'
1149               <<: *functest-jobs
1150             - name: 'functest-opnfv-functest-vnf-{tag}-rmi'
1151               <<: *functest-jobs
1152       - multijob:
1153           name: remove dependency
1154           projects:
1155             - name: 'functest-{repo}-{tag}-dep-rmi'
1156               <<: *functest-jobs
1157       - multijob:
1158           name: pull dependency
1159           projects:
1160             - name: 'functest-{repo}-{tag}-dep-pull'
1161               <<: *functest-jobs
1162       - multijob:
1163           name: build opnfv/functest-core
1164           projects:
1165             - name: 'functest-opnfv-functest-core-{tag}-gate'
1166               <<: *functest-jobs
1167       - multijob:
1168           name: build opnfv/functest-tempest
1169           projects:
1170             - name: 'functest-opnfv-functest-tempest-{tag}-gate'
1171               <<: *functest-jobs
1172       - multijob:
1173           name: build containers
1174           projects:
1175             - name: 'functest-opnfv-functest-healthcheck-{tag}-gate'
1176               <<: *functest-jobs
1177             - name: 'functest-opnfv-functest-smoke-{tag}-gate'
1178               <<: *functest-jobs
1179             - name: 'functest-opnfv-functest-benchmarking-{tag}-gate'
1180               <<: *functest-jobs
1181             - name: 'functest-opnfv-functest-vnf-{tag}-gate'
1182               <<: *functest-jobs
1183       - multijob:
1184           name: build cntt containers
1185           projects:
1186             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-gate'
1187               <<: *functest-jobs
1188             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-gate'
1189               <<: *functest-jobs
1190       - multijob:
1191           name: opnfv/functest-healthcheck:{tag}
1192           projects:
1193             - name: 'functest-opnfv-functest-healthcheck-{tag}-connection_check-run'
1194               <<: *functest-jobs
1195             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork1-run'
1196               <<: *functest-jobs
1197             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork2-run'
1198               <<: *functest-jobs
1199             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready1-run'
1200               <<: *functest-jobs
1201             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready2-run'
1202               <<: *functest-jobs
1203             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm1-run'
1204               <<: *functest-jobs
1205             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm2-run'
1206               <<: *functest-jobs
1207             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_ssh-run'
1208               <<: *functest-jobs
1209             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_userdata-run'
1210               <<: *functest-jobs
1211             - name: 'functest-opnfv-functest-healthcheck-{tag}-cinder_test-run'
1212               <<: *functest-jobs
1213             - name: 'functest-opnfv-functest-healthcheck-{tag}-odl-run'
1214               <<: *functest-jobs
1215             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_smoke-run'
1216               <<: *functest-jobs
1217             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_horizon-run'
1218               <<: *functest-jobs
1219       - multijob:
1220           name: opnfv/functest-smoke:{tag}
1221           projects:
1222             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_neutron-run'
1223               <<: *functest-jobs
1224             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cinder-run'
1225               <<: *functest-jobs
1226             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_keystone-run'
1227               <<: *functest-jobs
1228             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_heat-run'
1229               <<: *functest-jobs
1230             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_telemetry-run'
1231               <<: *functest-jobs
1232             - name: 'functest-opnfv-functest-smoke-{tag}-rally_sanity-run'
1233               <<: *functest-jobs
1234             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_defcore-run'
1235               <<: *functest-jobs
1236             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_compute-run'
1237               <<: *functest-jobs
1238             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_object-run'
1239               <<: *functest-jobs
1240             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_platform-run'
1241               <<: *functest-jobs
1242             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_full-run'
1243               <<: *functest-jobs
1244             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_scenario-run'
1245               <<: *functest-jobs
1246             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_slow-run'
1247               <<: *functest-jobs
1248             - name: 'functest-opnfv-functest-smoke-{tag}-patrole-run'
1249               <<: *functest-jobs
1250             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_admin-run'
1251               <<: *functest-jobs
1252             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_member-run'
1253               <<: *functest-jobs
1254             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_reader-run'
1255               <<: *functest-jobs
1256             - name: 'functest-opnfv-functest-smoke-{tag}-networking-bgpvpn-run'
1257               <<: *functest-jobs
1258             - name: 'functest-opnfv-functest-smoke-{tag}-networking-sfc-run'
1259               <<: *functest-jobs
1260             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_barbican-run'
1261               <<: *functest-jobs
1262             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_octavia-run'
1263               <<: *functest-jobs
1264             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cyborg-run'
1265               <<: *functest-jobs
1266       - multijob:
1267           name: opnfv/functest-smoke-cntt:{tag}
1268           projects:
1269             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_neutron_cntt-run'
1270               <<: *functest-jobs
1271             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_cinder_cntt-run'
1272               <<: *functest-jobs
1273             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_keystone_cntt-run'
1274               <<: *functest-jobs
1275             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_heat_cntt-run'
1276               <<: *functest-jobs
1277             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rally_sanity_cntt-run'
1278               <<: *functest-jobs
1279             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_full_cntt-run'
1280               <<: *functest-jobs
1281             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_scenario_cntt-run'
1282               <<: *functest-jobs
1283             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_slow_cntt-run'
1284               <<: *functest-jobs
1285       - multijob:
1286           name: opnfv/functest-benchmarking:{tag}
1287           projects:
1288             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_full-run'
1289               <<: *functest-jobs
1290             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_jobs-run'
1291               <<: *functest-jobs
1292             - name: 'functest-opnfv-functest-benchmarking-{tag}-vmtp-run'
1293               <<: *functest-jobs
1294             - name: 'functest-opnfv-functest-benchmarking-{tag}-shaker-run'
1295               <<: *functest-jobs
1296       - multijob:
1297           name: opnfv/functest-benchmarking-cntt:{tag}
1298           projects:
1299             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_full_cntt-run'
1300               <<: *functest-jobs
1301             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_jobs_cntt-run'
1302               <<: *functest-jobs
1303       - multijob:
1304           name: opnfv/functest-vnf:{tag}
1305           projects:
1306             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify-run'
1307               <<: *functest-jobs
1308             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify_ims-run'
1309               <<: *functest-jobs
1310             - name: 'functest-opnfv-functest-vnf-{tag}-heat_ims-run'
1311               <<: *functest-jobs
1312             - name: 'functest-opnfv-functest-vnf-{tag}-vyos_vrouter-run'
1313               <<: *functest-jobs
1314             - name: 'functest-opnfv-functest-vnf-{tag}-juju_epc-run'
1315               <<: *functest-jobs
1316
1317 - project:
1318     name: 'functest-review'
1319     <<: *functest-params
1320     jobs:
1321       - 'functest-{tag}-review'
1322
1323 - view:
1324     name: functest-review
1325     view-type: list
1326     columns:
1327       - status
1328       - weather
1329       - job
1330       - last-success
1331       - last-failure
1332       - last-duration
1333     regex: ^functest-[a-z0-9.]+-review$
1334
1335 - view:
1336     name: functest-tox
1337     view-type: list
1338     columns:
1339       - status
1340       - weather
1341       - job
1342       - last-success
1343       - last-failure
1344       - last-duration
1345     regex: ^functest-[a-z0-9.]+-tox$
1346
1347 - builder:
1348     name: functest-push-containers
1349     builders:
1350       - shell: |
1351           set +x
1352           if [ "{repo}" = "_" ]; then
1353             image={container}:{tag}
1354           elif [ "{port}" = "None" ]; then
1355             image={repo}/{container}:{tag}
1356           else
1357             image={repo}:{port}/{container}:{tag}
1358           fi
1359           sudo docker push $image
1360
1361 - trigger:
1362     name: functest-commit
1363     triggers:
1364       - pollscm:
1365           cron: "*/30 * * * *"
1366
1367 - job-template:
1368     name: 'functest-{repo}-{container}-{tag}-build'
1369     parameters:
1370       - functest-slave:
1371           slave: '{slave}'
1372     scm:
1373       - functest-scm:
1374           ref: '{branch}'
1375     builders:
1376       - functest-build-containers:
1377           <<: *functest-build-containers
1378           ref: '{branch}'
1379           build_args: '{build_args}'
1380       - functest-push-containers:
1381           <<: *functest-build-containers
1382           ref: '{branch}'
1383
1384 - project:
1385     name: functest-opnfv-functest-core-{tag}-build
1386     <<: *functest-params
1387     container: functest-core
1388     ref_arg: BRANCH
1389     path: docker/core
1390     jobs:
1391       - 'functest-{repo}-{container}-{tag}-build'
1392
1393 - project:
1394     name: functest-opnfv-functest-tempest-{tag}-build
1395     <<: *functest-params
1396     container: functest-tempest
1397     ref_arg: BRANCH
1398     path: docker/tempest
1399     exclude:
1400       - {'tag': 'latest'}
1401       - {'tag': 'wallaby'}
1402       - {'tag': 'leguer'}
1403       - {'tag': 'kali'}
1404       - {'tag': 'jerma'}
1405     jobs:
1406       - 'functest-{repo}-{container}-{tag}-build'
1407
1408 - project:
1409     name: functest-opnfv-functest-healthcheck-{tag}-build
1410     <<: *functest-params
1411     container: functest-healthcheck
1412     ref_arg: BRANCH
1413     path: docker/healthcheck
1414     jobs:
1415       - 'functest-{repo}-{container}-{tag}-build'
1416
1417 - project:
1418     name: functest-opnfv-functest-smoke-{tag}-build
1419     <<: *functest-params
1420     container: functest-smoke
1421     ref_arg: BRANCH
1422     path: docker/smoke
1423     jobs:
1424       - 'functest-{repo}-{container}-{tag}-build'
1425
1426 - project:
1427     name: functest-opnfv-functest-benchmarking-{tag}-build
1428     <<: *functest-params
1429     container: functest-benchmarking
1430     ref_arg: BRANCH
1431     path: docker/benchmarking
1432     jobs:
1433       - 'functest-{repo}-{container}-{tag}-build'
1434
1435 - project:
1436     name: functest-opnfv-functest-vnf-{tag}-build
1437     <<: *functest-params
1438     container: functest-vnf
1439     ref_arg:
1440     path: docker/vnf
1441     jobs:
1442       - 'functest-{repo}-{container}-{tag}-build'
1443
1444 - project:
1445     name: functest-opnfv-functest-smoke-cntt-{tag}-build
1446     <<: *functest-params
1447     container: functest-smoke-cntt
1448     ref_arg: BRANCH
1449     path: docker/smoke-cntt
1450     jobs:
1451       - 'functest-{repo}-{container}-{tag}-build'
1452
1453 - project:
1454     name: functest-opnfv-functest-benchmarking-cntt-{tag}-build
1455     <<: *functest-params
1456     container: functest-benchmarking-cntt
1457     ref_arg: BRANCH
1458     path: docker/benchmarking-cntt
1459     jobs:
1460       - 'functest-{repo}-{container}-{tag}-build'
1461
1462 - job-template:
1463     name: 'functest-{tag}-docker'
1464     project-type: multijob
1465     triggers:
1466       - functest-commit
1467     scm:
1468       - functest-scm:
1469           ref: '{branch}'
1470     parameters:
1471       - functest-slave:
1472           slave: '{slave}'
1473     # PyYAML and yamllint differ here
1474     # see https://github.com/yaml/pyyaml/issues/234
1475     # yamllint disable rule:indentation
1476     properties:
1477       - build-blocker:
1478           blocking-jobs:
1479           - ^functest-(pi-)*{tag}-(daily|docker|review)$
1480     # yamllint enable rule:indentation
1481     builders:
1482       - multijob:
1483           name: remove dependency
1484           projects:
1485             - name: 'functest-{repo}-{tag}-dep-rmi'
1486               <<: *functest-jobs
1487       - multijob:
1488           name: pull dependency
1489           projects:
1490             - name: 'functest-{repo}-{tag}-dep-pull'
1491               <<: *functest-jobs
1492       - multijob:
1493           name: build opnfv/functest-core
1494           projects:
1495             - name: 'functest-opnfv-functest-core-{tag}-build'
1496               <<: *functest-jobs
1497       - multijob:
1498           name: build opnfv/functest-tempest
1499           projects:
1500             - name: 'functest-opnfv-functest-tempest-{tag}-build'
1501               <<: *functest-jobs
1502       - multijob:
1503           name: build containers
1504           projects:
1505             - name: 'functest-opnfv-functest-healthcheck-{tag}-build'
1506               <<: *functest-jobs
1507             - name: 'functest-opnfv-functest-smoke-{tag}-build'
1508               <<: *functest-jobs
1509             - name: 'functest-opnfv-functest-benchmarking-{tag}-build'
1510               <<: *functest-jobs
1511             - name: 'functest-opnfv-functest-vnf-{tag}-build'
1512               <<: *functest-jobs
1513       - multijob:
1514           name: build cntt containers
1515           projects:
1516             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-build'
1517               <<: *functest-jobs
1518             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-build'
1519               <<: *functest-jobs
1520
1521 - builder:
1522     name: functest-trivy
1523     builders:
1524       - shell: |
1525           export EXTERNAL_NETWORK=public
1526           export VOLUME_DEVICE_NAME=sdb
1527           export IMAGE_PROPERTIES=hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
1528           sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive \
1529           apt-get install curl -y
1530
1531           curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b .
1532           if [ "{repo}" = "_" ]; then
1533             image={container}:{tag}
1534           elif [ "{port}" = "None" ]; then
1535             image={repo}/{container}:{tag}
1536           else
1537             image={repo}:{port}/{container}:{tag}
1538           fi
1539           ./trivy --exit-code 1 $image
1540
1541 - job-template:
1542     name: 'functest-{repo}-{container}-{tag}-trivy'
1543     triggers:
1544       - timed: '@weekly'
1545     parameters:
1546       - functest-slave:
1547           slave: '{slave}'
1548     builders:
1549       - functest-trivy:
1550           <<: *functest-containers
1551
1552 - project:
1553     name: 'functest-opnfv-functest-core-trivy'
1554     <<: *functest-params
1555     container: 'functest-core'
1556     jobs:
1557       - 'functest-{repo}-{container}-{tag}-trivy'
1558
1559 - project:
1560     name: 'functest-opnfv-functest-tempest-trivy'
1561     <<: *functest-params
1562     container: 'functest-tempest'
1563     jobs:
1564       - 'functest-{repo}-{container}-{tag}-trivy'
1565
1566 - project:
1567     name: 'functest-opnfv-functest-healthcheck-trivy'
1568     <<: *functest-params
1569     container: 'functest-healthcheck'
1570     jobs:
1571       - 'functest-{repo}-{container}-{tag}-trivy'
1572
1573 - project:
1574     name: 'functest-opnfv-functest-smoke-trivy'
1575     <<: *functest-params
1576     container: 'functest-smoke'
1577     jobs:
1578       - 'functest-{repo}-{container}-{tag}-trivy'
1579
1580 - project:
1581     name: 'functest-opnfv-functest-benchmarking-trivy'
1582     <<: *functest-params
1583     container: 'functest-benchmarking'
1584     jobs:
1585       - 'functest-{repo}-{container}-{tag}-trivy'
1586
1587 - project:
1588     name: 'functest-opnfv-functest-vnf-trivy'
1589     <<: *functest-params
1590     container: 'functest-vnf'
1591     jobs:
1592       - 'functest-{repo}-{container}-{tag}-trivy'
1593
1594 - project:
1595     name: 'functest-opnfv-functest-smoke-cntt-trivy'
1596     <<: *functest-params
1597     container: 'functest-smoke-cntt'
1598     jobs:
1599       - 'functest-{repo}-{container}-{tag}-trivy'
1600
1601 - project:
1602     name: 'functest-opnfv-functest-benchmarking-cntt-trivy'
1603     <<: *functest-params
1604     container: 'functest-benchmarking-cntt'
1605     jobs:
1606       - 'functest-{repo}-{container}-{tag}-trivy'
1607
1608 - project:
1609     name: 'functest'
1610     <<: *functest-params
1611     jobs:
1612       - 'functest-{tag}-docker'
1613
1614 - view:
1615     name: functest-docker
1616     view-type: list
1617     columns:
1618       - status
1619       - weather
1620       - job
1621       - last-success
1622       - last-failure
1623       - last-duration
1624     regex: ^functest-[a-z0-9.]+-docker$
1625
1626 - view:
1627     name: functest-trivy
1628     view-type: list
1629     columns:
1630       - status
1631       - weather
1632       - job
1633       - last-success
1634       - last-failure
1635       - last-duration
1636     regex: (?!functest-kubernetes)(?!functest-pi)^functest-[a-z-0-9.]+-trivy$