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