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