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