Cut moselle branch for barometer
[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             python3.9 python3.9-dev python3.9-distutils \
1040             python3.8 python3.8-dev python3.8-distutils \
1041             python3.7 python3.7-dev python3.6 python3.6-dev \
1042             python python-dev python3-pip enchant -y
1043           sudo pip3 install tox tox-pip-version
1044
1045           tox
1046
1047 - job-template:
1048     name: 'functest-{tag}-tox'
1049     scm:
1050       - functest-scm:
1051           ref: $GERRIT_REFSPEC
1052     triggers:
1053       - functest-patchset-created:
1054           branch: '{branch}'
1055     parameters:
1056       - functest-slave:
1057           slave: '{slave}'
1058     builders:
1059       - functest-tox:
1060
1061 - project:
1062     name: functest-tox
1063     <<: *functest-params
1064     jobs:
1065       - 'functest-{tag}-tox'
1066
1067 - job-template:
1068     name: 'functest-{repo}-{container}-{tag}-gate'
1069     parameters:
1070       - functest-slave:
1071           slave: '{slave}'
1072     scm:
1073       - functest-scm:
1074           ref: $GERRIT_REFSPEC
1075     builders:
1076       - functest-build-containers:
1077           <<: *functest-build-containers
1078           ref: $GERRIT_REFSPEC
1079           build_args: '{build_args}'
1080
1081 - project:
1082     name: functest-opnfv-functest-core-{tag}-gate
1083     <<: *functest-params
1084     container: functest-core
1085     ref_arg: BRANCH
1086     path: docker/core
1087     jobs:
1088       - 'functest-{repo}-{container}-{tag}-gate'
1089
1090 - project:
1091     name: functest-opnfv-functest-tempest-{tag}-gate
1092     <<: *functest-params
1093     container: functest-tempest
1094     ref_arg: BRANCH
1095     path: docker/tempest
1096     exclude:
1097       - {'tag': 'latest'}
1098       - {'tag': 'xena'}
1099       - {'tag': 'wallaby'}
1100       - {'tag': 'leguer'}
1101       - {'tag': 'kali'}
1102       - {'tag': 'jerma'}
1103     jobs:
1104       - 'functest-{repo}-{container}-{tag}-gate'
1105
1106 - project:
1107     name: functest-opnfv-functest-healthcheck-{tag}-gate
1108     <<: *functest-params
1109     container: functest-healthcheck
1110     ref_arg: BRANCH
1111     path: docker/healthcheck
1112     jobs:
1113       - 'functest-{repo}-{container}-{tag}-gate'
1114
1115 - project:
1116     name: functest-opnfv-functest-smoke-{tag}-gate
1117     <<: *functest-params
1118     container: functest-smoke
1119     ref_arg: BRANCH
1120     path: docker/smoke
1121     jobs:
1122       - 'functest-{repo}-{container}-{tag}-gate'
1123
1124 - project:
1125     name: functest-opnfv-functest-benchmarking-{tag}-gate
1126     <<: *functest-params
1127     container: functest-benchmarking
1128     ref_arg: BRANCH
1129     path: docker/benchmarking
1130     jobs:
1131       - 'functest-{repo}-{container}-{tag}-gate'
1132
1133 - project:
1134     name: functest-opnfv-functest-vnf-{tag}-gate
1135     <<: *functest-params
1136     container: functest-vnf
1137     ref_arg:
1138     path: docker/vnf
1139     jobs:
1140       - 'functest-{repo}-{container}-{tag}-gate'
1141
1142 - project:
1143     name: functest-opnfv-functest-smoke-cntt-{tag}-gate
1144     <<: *functest-params
1145     container: functest-smoke-cntt
1146     ref_arg: BRANCH
1147     path: docker/smoke-cntt
1148     jobs:
1149       - 'functest-{repo}-{container}-{tag}-gate'
1150
1151 - project:
1152     name: functest-opnfv-functest-benchmarking-cntt-{tag}-gate
1153     <<: *functest-params
1154     container: functest-benchmarking-cntt
1155     ref_arg: BRANCH
1156     path: docker/benchmarking-cntt
1157     jobs:
1158       - 'functest-{repo}-{container}-{tag}-gate'
1159
1160 - trigger:
1161     name: functest-patchset-created
1162     triggers:
1163       - gerrit:
1164           trigger-on:
1165             - patchset-created-event
1166             - comment-added-contains-event:
1167                 comment-contains-value: 'recheck'
1168             - comment-added-contains-event:
1169                 comment-contains-value: 'reverify'
1170           projects:
1171             - project-compare-type: 'ANT'
1172               project-pattern: 'functest'
1173               branches:
1174                 - branch-compare-type: 'ANT'
1175                   branch-pattern: '**/{branch}'
1176
1177 - job-template:
1178     name: 'functest-{tag}-review'
1179     project-type: multijob
1180     triggers:
1181       - functest-patchset-created:
1182           branch: '{branch}'
1183     parameters:
1184       - functest-slave:
1185           slave: '{slave}'
1186       - functest-build_tag:
1187           build_tag: ''
1188       - functest-EXTERNAL_NETWORK:
1189           EXTERNAL_NETWORK: public
1190       - functest-VOLUME_DEVICE_NAME:
1191           VOLUME_DEVICE_NAME: sdb
1192       - functest-IMAGE_PROPERTIES:
1193           IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi
1194     # PyYAML and yamllint differ here
1195     # see https://github.com/yaml/pyyaml/issues/234
1196     # yamllint disable rule:indentation
1197     properties:
1198       - build-blocker:
1199           blocking-jobs:
1200           - ^functest-(pi-)*{tag}-(daily|docker|review)$
1201     # yamllint enable rule:indentation
1202     builders:
1203       - multijob:
1204           name: remove former images
1205           projects:
1206             - name: 'functest-opnfv-functest-healthcheck-{tag}-rmi'
1207               <<: *functest-jobs
1208             - name: 'functest-opnfv-functest-smoke-{tag}-rmi'
1209               <<: *functest-jobs
1210             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rmi'
1211               <<: *functest-jobs
1212             - name: 'functest-opnfv-functest-benchmarking-{tag}-rmi'
1213               <<: *functest-jobs
1214             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rmi'
1215               <<: *functest-jobs
1216             - name: 'functest-opnfv-functest-vnf-{tag}-rmi'
1217               <<: *functest-jobs
1218       - multijob:
1219           name: remove dependency
1220           projects:
1221             - name: 'functest-{repo}-{tag}-dep-rmi'
1222               <<: *functest-jobs
1223       - multijob:
1224           name: pull dependency
1225           projects:
1226             - name: 'functest-{repo}-{tag}-dep-pull'
1227               <<: *functest-jobs
1228       - multijob:
1229           name: build opnfv/functest-core
1230           projects:
1231             - name: 'functest-opnfv-functest-core-{tag}-gate'
1232               <<: *functest-jobs
1233       - multijob:
1234           name: build opnfv/functest-tempest
1235           projects:
1236             - name: 'functest-opnfv-functest-tempest-{tag}-gate'
1237               <<: *functest-jobs
1238       - multijob:
1239           name: build containers
1240           projects:
1241             - name: 'functest-opnfv-functest-healthcheck-{tag}-gate'
1242               <<: *functest-jobs
1243             - name: 'functest-opnfv-functest-smoke-{tag}-gate'
1244               <<: *functest-jobs
1245             - name: 'functest-opnfv-functest-benchmarking-{tag}-gate'
1246               <<: *functest-jobs
1247             - name: 'functest-opnfv-functest-vnf-{tag}-gate'
1248               <<: *functest-jobs
1249       - multijob:
1250           name: build cntt containers
1251           projects:
1252             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-gate'
1253               <<: *functest-jobs
1254             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-gate'
1255               <<: *functest-jobs
1256       - multijob:
1257           name: opnfv/functest-healthcheck:{tag}
1258           projects:
1259             - name: 'functest-opnfv-functest-healthcheck-{tag}-connection_check-run'
1260               <<: *functest-jobs
1261             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork1-run'
1262               <<: *functest-jobs
1263             - name: 'functest-opnfv-functest-healthcheck-{tag}-tenantnetwork2-run'
1264               <<: *functest-jobs
1265             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready1-run'
1266               <<: *functest-jobs
1267             - name: 'functest-opnfv-functest-healthcheck-{tag}-vmready2-run'
1268               <<: *functest-jobs
1269             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm1-run'
1270               <<: *functest-jobs
1271             - name: 'functest-opnfv-functest-healthcheck-{tag}-singlevm2-run'
1272               <<: *functest-jobs
1273             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_ssh-run'
1274               <<: *functest-jobs
1275             - name: 'functest-opnfv-functest-healthcheck-{tag}-vping_userdata-run'
1276               <<: *functest-jobs
1277             - name: 'functest-opnfv-functest-healthcheck-{tag}-cinder_test-run'
1278               <<: *functest-jobs
1279             - name: 'functest-opnfv-functest-healthcheck-{tag}-odl-run'
1280               <<: *functest-jobs
1281             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_smoke-run'
1282               <<: *functest-jobs
1283             - name: 'functest-opnfv-functest-healthcheck-{tag}-tempest_horizon-run'
1284               <<: *functest-jobs
1285       - multijob:
1286           name: opnfv/functest-smoke:{tag}
1287           projects:
1288             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_neutron-run'
1289               <<: *functest-jobs
1290             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cinder-run'
1291               <<: *functest-jobs
1292             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_keystone-run'
1293               <<: *functest-jobs
1294             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_heat-run'
1295               <<: *functest-jobs
1296             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_telemetry-run'
1297               <<: *functest-jobs
1298             - name: 'functest-opnfv-functest-smoke-{tag}-rally_sanity-run'
1299               <<: *functest-jobs
1300             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_defcore-run'
1301               <<: *functest-jobs
1302             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_compute-run'
1303               <<: *functest-jobs
1304             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_object-run'
1305               <<: *functest-jobs
1306             - name: 'functest-opnfv-functest-smoke-{tag}-refstack_platform-run'
1307               <<: *functest-jobs
1308             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_full-run'
1309               <<: *functest-jobs
1310             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_scenario-run'
1311               <<: *functest-jobs
1312             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_slow-run'
1313               <<: *functest-jobs
1314             - name: 'functest-opnfv-functest-smoke-{tag}-patrole-run'
1315               <<: *functest-jobs
1316             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_admin-run'
1317               <<: *functest-jobs
1318             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_member-run'
1319               <<: *functest-jobs
1320             - name: 'functest-opnfv-functest-smoke-{tag}-patrole_reader-run'
1321               <<: *functest-jobs
1322             - name: 'functest-opnfv-functest-smoke-{tag}-networking-bgpvpn-run'
1323               <<: *functest-jobs
1324             - name: 'functest-opnfv-functest-smoke-{tag}-networking-sfc-run'
1325               <<: *functest-jobs
1326             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_barbican-run'
1327               <<: *functest-jobs
1328             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_octavia-run'
1329               <<: *functest-jobs
1330             - name: 'functest-opnfv-functest-smoke-{tag}-tempest_cyborg-run'
1331               <<: *functest-jobs
1332       - multijob:
1333           name: opnfv/functest-smoke-cntt:{tag}
1334           projects:
1335             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_neutron_cntt-run'
1336               <<: *functest-jobs
1337             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_cinder_cntt-run'
1338               <<: *functest-jobs
1339             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_keystone_cntt-run'
1340               <<: *functest-jobs
1341             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_heat_cntt-run'
1342               <<: *functest-jobs
1343             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-rally_sanity_cntt-run'
1344               <<: *functest-jobs
1345             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_full_cntt-run'
1346               <<: *functest-jobs
1347             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_scenario_cntt-run'
1348               <<: *functest-jobs
1349             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-tempest_slow_cntt-run'
1350               <<: *functest-jobs
1351       - multijob:
1352           name: opnfv/functest-benchmarking:{tag}
1353           projects:
1354             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_full-run'
1355               <<: *functest-jobs
1356             - name: 'functest-opnfv-functest-benchmarking-{tag}-rally_jobs-run'
1357               <<: *functest-jobs
1358             - name: 'functest-opnfv-functest-benchmarking-{tag}-vmtp-run'
1359               <<: *functest-jobs
1360             - name: 'functest-opnfv-functest-benchmarking-{tag}-shaker-run'
1361               <<: *functest-jobs
1362       - multijob:
1363           name: opnfv/functest-benchmarking-cntt:{tag}
1364           projects:
1365             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_full_cntt-run'
1366               <<: *functest-jobs
1367             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-rally_jobs_cntt-run'
1368               <<: *functest-jobs
1369       - multijob:
1370           name: opnfv/functest-vnf:{tag}
1371           projects:
1372             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify-run'
1373               <<: *functest-jobs
1374             - name: 'functest-opnfv-functest-vnf-{tag}-cloudify_ims-run'
1375               <<: *functest-jobs
1376             - name: 'functest-opnfv-functest-vnf-{tag}-heat_ims-run'
1377               <<: *functest-jobs
1378             - name: 'functest-opnfv-functest-vnf-{tag}-vyos_vrouter-run'
1379               <<: *functest-jobs
1380             - name: 'functest-opnfv-functest-vnf-{tag}-juju_epc-run'
1381               <<: *functest-jobs
1382     publishers:
1383       - email-ext:
1384           failure: false
1385           first-failure: true
1386           fixed: true
1387           recipients: cedric.ollivier@orange.com
1388
1389 - project:
1390     name: 'functest-review'
1391     <<: *functest-params
1392     jobs:
1393       - 'functest-{tag}-review'
1394
1395 - view:
1396     name: functest-review
1397     view-type: list
1398     columns:
1399       - status
1400       - weather
1401       - job
1402       - last-success
1403       - last-failure
1404       - last-duration
1405     regex: ^functest-[a-z0-9.]+-review$
1406
1407 - view:
1408     name: functest-tox
1409     view-type: list
1410     columns:
1411       - status
1412       - weather
1413       - job
1414       - last-success
1415       - last-failure
1416       - last-duration
1417     regex: ^functest-[a-z0-9.]+-tox$
1418
1419 - builder:
1420     name: functest-push-containers
1421     builders:
1422       - shell: |
1423           set +x
1424           if [ "{repo}" = "_" ]; then
1425             image={container}:{tag}
1426           elif [ "{port}" = "None" ]; then
1427             image={repo}/{container}:{tag}
1428           else
1429             image={repo}:{port}/{container}:{tag}
1430           fi
1431           sudo docker push $image
1432
1433 - trigger:
1434     name: functest-commit
1435     triggers:
1436       - pollscm:
1437           cron: "*/30 * * * *"
1438
1439 - job-template:
1440     name: 'functest-{repo}-{container}-{tag}-build'
1441     parameters:
1442       - functest-slave:
1443           slave: '{slave}'
1444     scm:
1445       - functest-scm:
1446           ref: '{branch}'
1447     builders:
1448       - functest-build-containers:
1449           <<: *functest-build-containers
1450           ref: '{branch}'
1451           build_args: '{build_args}'
1452       - functest-push-containers:
1453           <<: *functest-build-containers
1454           ref: '{branch}'
1455
1456 - project:
1457     name: functest-opnfv-functest-core-{tag}-build
1458     <<: *functest-params
1459     container: functest-core
1460     ref_arg: BRANCH
1461     path: docker/core
1462     jobs:
1463       - 'functest-{repo}-{container}-{tag}-build'
1464
1465 - project:
1466     name: functest-opnfv-functest-tempest-{tag}-build
1467     <<: *functest-params
1468     container: functest-tempest
1469     ref_arg: BRANCH
1470     path: docker/tempest
1471     exclude:
1472       - {'tag': 'latest'}
1473       - {'tag': 'xena'}
1474       - {'tag': 'wallaby'}
1475       - {'tag': 'leguer'}
1476       - {'tag': 'kali'}
1477       - {'tag': 'jerma'}
1478     jobs:
1479       - 'functest-{repo}-{container}-{tag}-build'
1480
1481 - project:
1482     name: functest-opnfv-functest-healthcheck-{tag}-build
1483     <<: *functest-params
1484     container: functest-healthcheck
1485     ref_arg: BRANCH
1486     path: docker/healthcheck
1487     jobs:
1488       - 'functest-{repo}-{container}-{tag}-build'
1489
1490 - project:
1491     name: functest-opnfv-functest-smoke-{tag}-build
1492     <<: *functest-params
1493     container: functest-smoke
1494     ref_arg: BRANCH
1495     path: docker/smoke
1496     jobs:
1497       - 'functest-{repo}-{container}-{tag}-build'
1498
1499 - project:
1500     name: functest-opnfv-functest-benchmarking-{tag}-build
1501     <<: *functest-params
1502     container: functest-benchmarking
1503     ref_arg: BRANCH
1504     path: docker/benchmarking
1505     jobs:
1506       - 'functest-{repo}-{container}-{tag}-build'
1507
1508 - project:
1509     name: functest-opnfv-functest-vnf-{tag}-build
1510     <<: *functest-params
1511     container: functest-vnf
1512     ref_arg:
1513     path: docker/vnf
1514     jobs:
1515       - 'functest-{repo}-{container}-{tag}-build'
1516
1517 - project:
1518     name: functest-opnfv-functest-smoke-cntt-{tag}-build
1519     <<: *functest-params
1520     container: functest-smoke-cntt
1521     ref_arg: BRANCH
1522     path: docker/smoke-cntt
1523     jobs:
1524       - 'functest-{repo}-{container}-{tag}-build'
1525
1526 - project:
1527     name: functest-opnfv-functest-benchmarking-cntt-{tag}-build
1528     <<: *functest-params
1529     container: functest-benchmarking-cntt
1530     ref_arg: BRANCH
1531     path: docker/benchmarking-cntt
1532     jobs:
1533       - 'functest-{repo}-{container}-{tag}-build'
1534
1535 - job-template:
1536     name: 'functest-{tag}-docker'
1537     project-type: multijob
1538     triggers:
1539       - functest-commit
1540     scm:
1541       - functest-scm:
1542           ref: '{branch}'
1543     parameters:
1544       - functest-slave:
1545           slave: '{slave}'
1546     # PyYAML and yamllint differ here
1547     # see https://github.com/yaml/pyyaml/issues/234
1548     # yamllint disable rule:indentation
1549     properties:
1550       - build-blocker:
1551           blocking-jobs:
1552           - ^functest-(pi-)*{tag}-(daily|docker|review)$
1553     # yamllint enable rule:indentation
1554     builders:
1555       - multijob:
1556           name: remove dependency
1557           projects:
1558             - name: 'functest-{repo}-{tag}-dep-rmi'
1559               <<: *functest-jobs
1560       - multijob:
1561           name: pull dependency
1562           projects:
1563             - name: 'functest-{repo}-{tag}-dep-pull'
1564               <<: *functest-jobs
1565       - multijob:
1566           name: build opnfv/functest-core
1567           projects:
1568             - name: 'functest-opnfv-functest-core-{tag}-build'
1569               <<: *functest-jobs
1570       - multijob:
1571           name: build opnfv/functest-tempest
1572           projects:
1573             - name: 'functest-opnfv-functest-tempest-{tag}-build'
1574               <<: *functest-jobs
1575       - multijob:
1576           name: build containers
1577           projects:
1578             - name: 'functest-opnfv-functest-healthcheck-{tag}-build'
1579               <<: *functest-jobs
1580             - name: 'functest-opnfv-functest-smoke-{tag}-build'
1581               <<: *functest-jobs
1582             - name: 'functest-opnfv-functest-benchmarking-{tag}-build'
1583               <<: *functest-jobs
1584             - name: 'functest-opnfv-functest-vnf-{tag}-build'
1585               <<: *functest-jobs
1586       - multijob:
1587           name: build cntt containers
1588           projects:
1589             - name: 'functest-opnfv-functest-smoke-cntt-{tag}-build'
1590               <<: *functest-jobs
1591             - name: 'functest-opnfv-functest-benchmarking-cntt-{tag}-build'
1592               <<: *functest-jobs
1593     publishers:
1594       - email-ext:
1595           failure: false
1596           first-failure: true
1597           fixed: true
1598           recipients: cedric.ollivier@orange.com
1599
1600 - builder:
1601     name: functest-trivy
1602     builders:
1603       - shell: |
1604           sudo apt-get -o DPkg::Lock::Timeout=300 update && \
1605           sudo DEBIAN_FRONTEND=noninteractive apt-get \
1606             -o DPkg::Lock::Timeout=300 install curl -y
1607
1608           curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b .
1609           if [ "{repo}" = "_" ]; then
1610             image={container}:{tag}
1611           elif [ "{port}" = "None" ]; then
1612             image={repo}/{container}:{tag}
1613           else
1614             image={repo}:{port}/{container}:{tag}
1615           fi
1616           ./trivy image --exit-code 1 $image
1617
1618 - job-template:
1619     name: 'functest-{repo}-{container}-{tag}-trivy'
1620     triggers:
1621       - timed: '@weekly'
1622     parameters:
1623       - functest-slave:
1624           slave: '{slave}'
1625     builders:
1626       - functest-trivy:
1627           <<: *functest-containers
1628     publishers:
1629       - email-ext:
1630           failure: false
1631           first-failure: true
1632           fixed: true
1633           recipients: cedric.ollivier@orange.com
1634
1635 - project:
1636     name: 'functest-opnfv-functest-core-trivy'
1637     <<: *functest-params
1638     container: 'functest-core'
1639     jobs:
1640       - 'functest-{repo}-{container}-{tag}-trivy'
1641
1642 - project:
1643     name: 'functest-opnfv-functest-tempest-trivy'
1644     <<: *functest-params
1645     container: 'functest-tempest'
1646     jobs:
1647       - 'functest-{repo}-{container}-{tag}-trivy'
1648
1649 - project:
1650     name: 'functest-opnfv-functest-healthcheck-trivy'
1651     <<: *functest-params
1652     container: 'functest-healthcheck'
1653     jobs:
1654       - 'functest-{repo}-{container}-{tag}-trivy'
1655
1656 - project:
1657     name: 'functest-opnfv-functest-smoke-trivy'
1658     <<: *functest-params
1659     container: 'functest-smoke'
1660     jobs:
1661       - 'functest-{repo}-{container}-{tag}-trivy'
1662
1663 - project:
1664     name: 'functest-opnfv-functest-benchmarking-trivy'
1665     <<: *functest-params
1666     container: 'functest-benchmarking'
1667     jobs:
1668       - 'functest-{repo}-{container}-{tag}-trivy'
1669
1670 - project:
1671     name: 'functest-opnfv-functest-vnf-trivy'
1672     <<: *functest-params
1673     container: 'functest-vnf'
1674     jobs:
1675       - 'functest-{repo}-{container}-{tag}-trivy'
1676
1677 - project:
1678     name: 'functest-opnfv-functest-smoke-cntt-trivy'
1679     <<: *functest-params
1680     container: 'functest-smoke-cntt'
1681     jobs:
1682       - 'functest-{repo}-{container}-{tag}-trivy'
1683
1684 - project:
1685     name: 'functest-opnfv-functest-benchmarking-cntt-trivy'
1686     <<: *functest-params
1687     container: 'functest-benchmarking-cntt'
1688     jobs:
1689       - 'functest-{repo}-{container}-{tag}-trivy'
1690
1691 - builder:
1692     name: functest-grype
1693     builders:
1694       - shell: |
1695           sudo apt-get -o DPkg::Lock::Timeout=300 update && \
1696           sudo DEBIAN_FRONTEND=noninteractive apt-get \
1697             -o DPkg::Lock::Timeout=300 install curl -y
1698
1699           curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sudo sh -s -- -b .
1700           if [ "{repo}" = "_" ]; then
1701             image={container}:{tag}
1702           elif [ "{port}" = "None" ]; then
1703             image={repo}/{container}:{tag}
1704           else
1705             image={repo}:{port}/{container}:{tag}
1706           fi
1707           ./grype -q $image
1708
1709 - job-template:
1710     name: 'functest-{repo}-{container}-{tag}-grype'
1711     triggers:
1712       - timed: '@weekly'
1713     parameters:
1714       - functest-slave:
1715           slave: '{slave}'
1716     builders:
1717       - functest-grype:
1718           <<: *functest-containers
1719     publishers:
1720       - email-ext:
1721           failure: false
1722           first-failure: true
1723           fixed: true
1724           recipients: cedric.ollivier@orange.com
1725
1726 - project:
1727     name: 'functest-opnfv-functest-core-grype'
1728     <<: *functest-params
1729     container: 'functest-core'
1730     jobs:
1731       - 'functest-{repo}-{container}-{tag}-grype'
1732
1733 - project:
1734     name: 'functest-opnfv-functest-tempest-grype'
1735     <<: *functest-params
1736     container: 'functest-tempest'
1737     jobs:
1738       - 'functest-{repo}-{container}-{tag}-grype'
1739
1740 - project:
1741     name: 'functest-opnfv-functest-healthcheck-grype'
1742     <<: *functest-params
1743     container: 'functest-healthcheck'
1744     jobs:
1745       - 'functest-{repo}-{container}-{tag}-grype'
1746
1747 - project:
1748     name: 'functest-opnfv-functest-smoke-grype'
1749     <<: *functest-params
1750     container: 'functest-smoke'
1751     jobs:
1752       - 'functest-{repo}-{container}-{tag}-grype'
1753
1754 - project:
1755     name: 'functest-opnfv-functest-benchmarking-grype'
1756     <<: *functest-params
1757     container: 'functest-benchmarking'
1758     jobs:
1759       - 'functest-{repo}-{container}-{tag}-grype'
1760
1761 - project:
1762     name: 'functest-opnfv-functest-vnf-grype'
1763     <<: *functest-params
1764     container: 'functest-vnf'
1765     jobs:
1766       - 'functest-{repo}-{container}-{tag}-grype'
1767
1768 - project:
1769     name: 'functest-opnfv-functest-smoke-cntt-grype'
1770     <<: *functest-params
1771     container: 'functest-smoke-cntt'
1772     jobs:
1773       - 'functest-{repo}-{container}-{tag}-grype'
1774
1775 - project:
1776     name: 'functest-opnfv-functest-benchmarking-cntt-grype'
1777     <<: *functest-params
1778     container: 'functest-benchmarking-cntt'
1779     jobs:
1780       - 'functest-{repo}-{container}-{tag}-grype'
1781
1782 - project:
1783     name: 'functest'
1784     <<: *functest-params
1785     jobs:
1786       - 'functest-{tag}-docker'
1787
1788 - view:
1789     name: functest-docker
1790     view-type: list
1791     columns:
1792       - status
1793       - weather
1794       - job
1795       - last-success
1796       - last-failure
1797       - last-duration
1798     regex: ^functest-[a-z0-9.]+-docker$
1799
1800 - view:
1801     name: functest-trivy
1802     view-type: list
1803     columns:
1804       - status
1805       - weather
1806       - job
1807       - last-success
1808       - last-failure
1809       - last-duration
1810     regex: (?!functest-kubernetes)(?!functest-pi)^functest-[a-z-0-9.]+-trivy$
1811
1812 - view:
1813     name: functest-grype
1814     view-type: list
1815     columns:
1816       - status
1817       - weather
1818       - job
1819       - last-success
1820       - last-failure
1821       - last-duration
1822     regex: (?!functest-kubernetes)(?!functest-pi)^functest-[a-z-0-9.]+-grype$