Merge "Improve kuberef lint script"
[releng.git] / jjb / functest / functest-kubernetes.yaml
1 ---
2 - functest-kubernetes-jobs: &functest-kubernetes-jobs
3     name: 'functest-kubernetes-jobs'
4     current-parameters: true
5
6 - functest-kubernetes-params: &functest-kubernetes-params
7     name: 'functest-kubernetes-params'
8     repo: 'opnfv'
9     port:
10     tag:
11       - latest:
12           branch: master
13           slave: lf-virtual1-5
14       - kali:
15           branch: stable/kali
16           slave: lf-virtual1-4
17       - jerma:
18           branch: stable/jerma
19           slave: lf-virtual1-3
20       - iruya:
21           branch: stable/iruya
22           slave: lf-virtual1-2
23       - hunter:
24           branch: stable/hunter
25           slave: lf-virtual1-1
26       - arm64-latest:
27           branch: master
28           slave: lf-virtual1-5
29       - arm64-kali:
30           branch: stable/kali
31           slave: lf-virtual1-4
32       - arm64-jerma:
33           branch: stable/jerma
34           slave: lf-virtual1-3
35       - arm64-iruya:
36           branch: stable/iruya
37           slave: lf-virtual1-2
38       - arm64-hunter:
39           branch: stable/hunter
40           slave: lf-virtual1-1
41
42 - parameter:
43     name: functest-kubernetes-slave
44     parameters:
45       - label:
46           name: slave
47           default: '{slave}'
48
49 - parameter:
50     name: functest-kubernetes-build_tag
51     parameters:
52       - random-string:
53           name: build_tag
54
55 - parameter:
56     name: functest-kubernetes-branch
57     parameters:
58       - string:
59           name: branch
60           default: '{branch}'
61
62 - parameter:
63     name: functest-kubernetes-DEPLOY_SCENARIO
64     parameters:
65       - string:
66           name: DEPLOY_SCENARIO
67           default: k8-nosdn-nofeature-noha
68 - parameter:
69     name: functest-kubernetes-DEBUG
70     parameters:
71       - string:
72           name: DEBUG
73           default: 'true'
74
75 - functest-kubernetes-containers: &functest-kubernetes-containers
76     name: 'functest-kubernetes-containers'
77     repo: '{repo}'
78     port: '{port}'
79     container: '{container}'
80     tag: '{tag}'
81
82 - functest-kubernetes-run-containers: &functest-kubernetes-run-containers
83     name: 'functest-kubernetes-run-containers'
84     <<: *functest-kubernetes-containers
85     test: '{test}'
86     privileged: '{privileged}'
87     network: '{network}'
88
89 - builder:
90     name: functest-kubernetes-pull-containers
91     builders:
92       - shell: |
93           set +x
94           if [ "{repo}" = "_" ]; then
95             image={container}:{tag}
96           elif [ "{port}" = "None" ]; then
97             image={repo}/{container}:{tag}
98           else
99             image={repo}:{port}/{container}:{tag}
100           fi
101           docker pull $image
102
103 - builder:
104     name: functest-kubernetes-run-containers
105     builders:
106       - shell: |
107           set +x
108           [ ! -z "$WORKSPACE" ] && rm -rf $WORKSPACE/* || true
109           if [ "{repo}" = "_" ]; then
110             image={container}:{tag}
111           elif [ "{port}" = "None" ]; then
112             image={repo}/{container}:{tag}
113           else
114             image={repo}:{port}/{container}:{tag}
115           fi
116           docker run --rm \
117             --privileged={privileged} \
118             --network={network} \
119             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
120             -e S3_DST_URL=s3://artifacts.opnfv.org/functest-kubernetes/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
121             -e HTTP_DST_URL=http://artifacts.opnfv.org/functest-kubernetes/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
122             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
123             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
124             -e NODE_NAME=$slave \
125             -e BUILD_TAG=$BUILD_TAG \
126             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
127             -e DEPLOY_SCENARIO=$DEPLOY_SCENARIO \
128             -e DEBUG=$DEBUG \
129             -v /home/opnfv/functest-kubernetes/config.{tag}:/root/.kube/config \
130             -v /home/opnfv/functest-kubernetes/.boto:/root/.boto \
131             $image run_tests -t {test} -p -r
132
133 - builder:
134     name: functest-kubernetes-remove-images
135     builders:
136       - shell: |
137           set +x
138           if [ "{repo}" = "_" ]; then
139             image={container}:{tag}
140           elif [ "{port}" = "None" ]; then
141             image={repo}/{container}:{tag}
142           else
143             image={repo}:{port}/{container}:{tag}
144           fi
145           docker rmi $image || true
146
147 - functest-kubernetes-build-containers: &functest-kubernetes-build-containers
148     name: 'functest-kubernetes-build-containers'
149     <<: *functest-kubernetes-containers
150     ref_arg: '{ref_arg}'
151     path: '{path}'
152
153 - builder:
154     name: functest-kubernetes-build-containers
155     builders:
156       - shell: |
157           set +x
158           if [ "{repo}" = "_" ]; then
159             image={container}:{tag}
160           elif [ "{port}" = "None" ]; then
161             image={repo}/{container}:{tag}
162           else
163             image={repo}:{port}/{container}:{tag}
164           fi
165           if [ "{ref_arg}" = "None" ]; then
166             build_arg=""
167           else
168             build_arg="--build-arg {ref_arg}={ref}"
169           fi
170           cd {path}
171           docker build $build_arg \
172             --pull=false --no-cache --force-rm=true \
173             -t $image .
174
175 - scm:
176     name: functest-kubernetes-scm
177     scm:
178       - git:
179           url: https://gerrit.opnfv.org/gerrit/functest-kubernetes
180           refspec: '+refs/changes/*:refs/changes/*'
181           branches:
182             - '{ref}'
183
184 - job-template:
185     name: 'functest-kubernetes-{repo}-{container}-{tag}-pull'
186     parameters:
187       - functest-kubernetes-slave:
188           slave: '{slave}'
189     builders:
190       - functest-kubernetes-pull-containers:
191           <<: *functest-kubernetes-containers
192
193 - project:
194     name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-pull'
195     <<: *functest-kubernetes-params
196     container: 'functest-kubernetes-healthcheck'
197     jobs:
198       - 'functest-kubernetes-{repo}-{container}-{tag}-pull'
199
200 - project:
201     name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-pull'
202     <<: *functest-kubernetes-params
203     container: 'functest-kubernetes-smoke'
204     jobs:
205       - 'functest-kubernetes-{repo}-{container}-{tag}-pull'
206
207 - project:
208     name: 'functest-kubernetes-opnfv-functest-kubernetes-security-pull'
209     <<: *functest-kubernetes-params
210     container: 'functest-kubernetes-security'
211     jobs:
212       - 'functest-kubernetes-{repo}-{container}-{tag}-pull'
213
214 - project:
215     name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-pull'
216     <<: *functest-kubernetes-params
217     container: 'functest-kubernetes-benchmarking'
218     jobs:
219       - 'functest-kubernetes-{repo}-{container}-{tag}-pull'
220
221 - project:
222     name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-pull'
223     <<: *functest-kubernetes-params
224     container: 'functest-kubernetes-cnf'
225     jobs:
226       - 'functest-kubernetes-{repo}-{container}-{tag}-pull'
227
228 - job-template:
229     name: 'functest-kubernetes-{repo}-{container}-{tag}-rmi'
230     parameters:
231       - functest-kubernetes-slave:
232           slave: '{slave}'
233     builders:
234       - functest-kubernetes-remove-images:
235           <<: *functest-kubernetes-containers
236
237 - project:
238     name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-rmi'
239     <<: *functest-kubernetes-params
240     container: 'functest-kubernetes-healthcheck'
241     jobs:
242       - 'functest-kubernetes-{repo}-{container}-{tag}-rmi'
243
244 - project:
245     name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-rmi'
246     <<: *functest-kubernetes-params
247     container: 'functest-kubernetes-smoke'
248     jobs:
249       - 'functest-kubernetes-{repo}-{container}-{tag}-rmi'
250
251 - project:
252     name: 'functest-kubernetes-opnfv-functest-kubernetes-security-rmi'
253     <<: *functest-kubernetes-params
254     container: 'functest-kubernetes-security'
255     jobs:
256       - 'functest-kubernetes-{repo}-{container}-{tag}-rmi'
257
258 - project:
259     name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-rmi'
260     <<: *functest-kubernetes-params
261     container: 'functest-kubernetes-benchmarking'
262     jobs:
263       - 'functest-kubernetes-{repo}-{container}-{tag}-rmi'
264
265 - project:
266     name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-rmi'
267     <<: *functest-kubernetes-params
268     container: 'functest-kubernetes-cnf'
269     jobs:
270       - 'functest-kubernetes-{repo}-{container}-{tag}-rmi'
271
272 - job-template:
273     name: 'functest-kubernetes-{repo}-{container}-{tag}-{test}-run'
274     parameters:
275       - functest-kubernetes-slave:
276           slave: '{slave}'
277       - functest-kubernetes-build_tag:
278           build_tag: ''
279       - functest-kubernetes-DEPLOY_SCENARIO:
280           DEPLOY_SCENARIO: k8-nosdn-nofeature-noha
281       - functest-kubernetes-DEBUG:
282           DEBUG: 'true'
283     builders:
284       - functest-kubernetes-run-containers:
285           <<: *functest-kubernetes-run-containers
286
287 - project:
288     name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck'
289     <<: *functest-kubernetes-params
290     container: 'functest-kubernetes-healthcheck'
291     test:
292       - k8s_smoke
293     privileged: 'false'
294     network: bridge
295     jobs:
296       - 'functest-kubernetes-{repo}-{container}-{tag}-{test}-run'
297
298 - project:
299     name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke'
300     <<: *functest-kubernetes-params
301     container: 'functest-kubernetes-smoke'
302     test:
303       - xrally_kubernetes
304       - k8s_conformance
305     privileged: 'false'
306     network: bridge
307     jobs:
308       - 'functest-kubernetes-{repo}-{container}-{tag}-{test}-run'
309
310 - project:
311     name: 'functest-kubernetes-opnfv-functest-kubernetes-security'
312     <<: *functest-kubernetes-params
313     container: 'functest-kubernetes-security'
314     test:
315       - kube_hunter
316       - kube_bench
317     privileged: 'false'
318     network: bridge
319     jobs:
320       - 'functest-kubernetes-{repo}-{container}-{tag}-{test}-run'
321
322 - project:
323     name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking'
324     <<: *functest-kubernetes-params
325     container: 'functest-kubernetes-benchmarking'
326     test:
327       - xrally_kubernetes_full
328     privileged: 'false'
329     network: bridge
330     jobs:
331       - 'functest-kubernetes-{repo}-{container}-{tag}-{test}-run'
332
333 - project:
334     name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf'
335     <<: *functest-kubernetes-params
336     container: 'functest-kubernetes-cnf'
337     test:
338       - k8s_vims
339     privileged: 'false'
340     network: bridge
341     jobs:
342       - 'functest-kubernetes-{repo}-{container}-{tag}-{test}-run'
343
344
345 - builder:
346     name: functest-kubernetes-zip
347     builders:
348       - shell: |
349           set +x
350           [ ! -z "$WORKSPACE" ] && rm -rf $WORKSPACE/* || true
351           if [ "{repo}" = "_" ]; then
352             image={container}:{tag}
353           elif [ "{port}" = "None" ]; then
354             image={repo}/{container}:{tag}
355           else
356             image={repo}:{port}/{container}:{tag}
357           fi
358           docker run --rm \
359             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
360             -e S3_DST_URL=s3://artifacts.opnfv.org/functest-kubernetes \
361             -e HTTP_DST_URL=http://artifacts.opnfv.org/functest-kubernetes \
362             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
363             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
364             -e BUILD_TAG=$BUILD_TAG \
365             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
366             -e DEPLOY_SCENARIO=$DEPLOY_SCENARIO \
367             -e DEBUG=$DEBUG \
368             -v /home/opnfv/functest-kubernetes/config.{tag}:/root/.kube/config \
369             -v /home/opnfv/functest-kubernetes/.boto:/root/.boto \
370             $image zip_campaign
371
372 - job-template:
373     name: 'functest-kubernetes-{tag}-zip'
374     parameters:
375       - functest-kubernetes-slave:
376           slave: '{slave}'
377       - functest-kubernetes-build_tag:
378           build_tag: ''
379       - functest-kubernetes-DEPLOY_SCENARIO:
380           DEPLOY_SCENARIO: k8-nosdn-nofeature-noha
381       - functest-kubernetes-DEBUG:
382           DEBUG: 'true'
383     builders:
384       - functest-kubernetes-zip:
385           <<: *functest-kubernetes-containers
386
387 - project:
388     name: 'functest-kubernetes-{tag}-zip'
389     <<: *functest-kubernetes-params
390     container: 'functest-kubernetes-healthcheck'
391     jobs:
392       - 'functest-kubernetes-{tag}-zip'
393
394 - job-template:
395     name: 'functest-kubernetes-{tag}-daily'
396     project-type: multijob
397     triggers:
398       - timed: '@weekly'
399     parameters:
400       - functest-kubernetes-slave:
401           slave: '{slave}'
402       - functest-kubernetes-build_tag:
403           build_tag: ''
404       - functest-kubernetes-DEPLOY_SCENARIO:
405           DEPLOY_SCENARIO: k8-nosdn-nofeature-noha
406       - functest-kubernetes-DEBUG:
407           DEBUG: 'true'
408     properties:
409       - build-blocker:
410           use-build-blocker: true
411           blocking-level: 'GLOBAL'
412           blocking-jobs:
413             - '^functest-kubernetes(-pi)?-(arm.*-|amd64-)*[a-z]+-(daily|gate|check)$'
414     builders:
415       - multijob:
416           name: remove former images
417           projects:
418             - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-rmi'
419               <<: *functest-kubernetes-jobs
420             - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-rmi'
421               <<: *functest-kubernetes-jobs
422             - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-rmi'
423               <<: *functest-kubernetes-jobs
424             - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-pull'
425               <<: *functest-kubernetes-jobs
426             - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-rmi'
427               <<: *functest-kubernetes-jobs
428       - multijob:
429           name: pull containers
430           projects:
431             - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-pull'
432               <<: *functest-kubernetes-jobs
433             - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-pull'
434               <<: *functest-kubernetes-jobs
435             - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-pull'
436               <<: *functest-kubernetes-jobs
437             - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-pull'
438               <<: *functest-kubernetes-jobs
439             - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-pull'
440               <<: *functest-kubernetes-jobs
441       - multijob:
442           name: opnfv/functest-kubernetes-healthcheck:{tag}
443           projects:
444             - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-k8s_smoke-run'
445               <<: *functest-kubernetes-jobs
446       - multijob:
447           name: opnfv/functest-kubernetes-smoke:{tag}
448           projects:
449             - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-xrally_kubernetes-run'
450               <<: *functest-kubernetes-jobs
451             - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-k8s_conformance-run'
452               <<: *functest-kubernetes-jobs
453       - multijob:
454           name: opnfv/functest-kubernetes-security:{tag}
455           projects:
456             - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-kube_hunter-run'
457               <<: *functest-kubernetes-jobs
458             - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-kube_bench-run'
459               <<: *functest-kubernetes-jobs
460       - multijob:
461           name: opnfv/functest-kubernetes-benchmarking:{tag}
462           projects:
463             - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-xrally_kubernetes_full-run'
464               <<: *functest-kubernetes-jobs
465       - multijob:
466           name: opnfv/functest-kubernetes-cnf:{tag}
467           projects:
468             - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-k8s_vims-run'
469               <<: *functest-kubernetes-jobs
470       - multijob:
471           name: dump all campaign data
472           projects:
473             - name: 'functest-kubernetes-{tag}-zip'
474               <<: *functest-kubernetes-jobs
475
476 - job-template:
477     name: 'functest-kubernetes-{repo}-{container}-{tag}-gate'
478     parameters:
479       - functest-kubernetes-slave:
480           slave: '{slave}'
481     scm:
482       - functest-kubernetes-scm:
483           ref: $GERRIT_REFSPEC
484     builders:
485       - functest-kubernetes-build-containers:
486           <<: *functest-kubernetes-build-containers
487           ref: $GERRIT_REFSPEC
488
489 - job-template:
490     name: 'functest-kubernetes-{repo}-{container}-{tag}-check'
491     parameters:
492       - functest-kubernetes-slave:
493           slave: '{slave}'
494       - functest-kubernetes-branch:
495           branch: '{branch}'
496     scm:
497       - functest-kubernetes-scm:
498           ref: $branch
499     builders:
500       - functest-kubernetes-build-containers:
501           <<: *functest-kubernetes-build-containers
502           ref: $branch
503
504 - project:
505     name: 'functest-kubernetes-_-golang-1.15-alpine3.12-rmi'
506     repo: _
507     port:
508     container: golang
509     tag: '1.15-alpine3.12'
510     slave: master
511     exclude:
512       - tag: arm64-latest
513       - tag: arm64-kali
514       - tag: arm64-jerma
515       - tag: arm64-iruya
516       - tag: arm64-hunter
517     jobs:
518       - 'functest-kubernetes-{repo}-{container}-{tag}-rmi'
519
520 - project:
521     name: 'functest-kubernetes-_-golang-1.15-alpine3.12-pull'
522     repo: _
523     port:
524     container: golang
525     tag: '1.15-alpine3.12'
526     slave: master
527     exclude:
528       - tag: arm64-latest
529       - tag: arm64-kali
530       - tag: arm64-jerma
531       - tag: arm64-iruya
532       - tag: arm64-hunter
533     jobs:
534       - 'functest-kubernetes-{repo}-{container}-{tag}-pull'
535
536 - project:
537     name: functest-kubernetes-opnfv-functest-kubernetes-core-{tag}-build
538     <<: *functest-kubernetes-params
539     container: functest-kubernetes-core
540     ref_arg: BRANCH
541     path: docker/core
542     exclude:
543       - tag: arm64-latest
544       - tag: arm64-kali
545       - tag: arm64-jerma
546       - tag: arm64-iruya
547       - tag: arm64-hunter
548     jobs:
549       - 'functest-kubernetes-{repo}-{container}-{tag}-gate'
550       - 'functest-kubernetes-{repo}-{container}-{tag}-check'
551
552 - project:
553     name: functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-build
554     <<: *functest-kubernetes-params
555     container: functest-kubernetes-healthcheck
556     ref_arg:
557     path: docker/healthcheck
558     exclude:
559       - tag: arm64-latest
560       - tag: arm64-kali
561       - tag: arm64-jerma
562       - tag: arm64-iruya
563       - tag: arm64-hunter
564     jobs:
565       - 'functest-kubernetes-{repo}-{container}-{tag}-gate'
566       - 'functest-kubernetes-{repo}-{container}-{tag}-check'
567
568 - project:
569     name: functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-build
570     <<: *functest-kubernetes-params
571     container: functest-kubernetes-cnf
572     ref_arg: BRANCH
573     path: docker/cnf
574     exclude:
575       - tag: arm64-latest
576       - tag: arm64-kali
577       - tag: arm64-jerma
578       - tag: arm64-iruya
579       - tag: arm64-hunter
580     jobs:
581       - 'functest-kubernetes-{repo}-{container}-{tag}-gate'
582       - 'functest-kubernetes-{repo}-{container}-{tag}-check'
583
584 - project:
585     name: functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-build
586     <<: *functest-kubernetes-params
587     container: functest-kubernetes-security
588     ref_arg: BRANCH
589     path: docker/security
590     exclude:
591       - tag: arm64-latest
592       - tag: arm64-kali
593       - tag: arm64-jerma
594       - tag: arm64-iruya
595       - tag: arm64-hunter
596     jobs:
597       - 'functest-kubernetes-{repo}-{container}-{tag}-gate'
598       - 'functest-kubernetes-{repo}-{container}-{tag}-check'
599
600 - project:
601     name: functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-build
602     <<: *functest-kubernetes-params
603     container: functest-kubernetes-smoke
604     ref_arg:
605     path: docker/smoke
606     exclude:
607       - tag: arm64-latest
608       - tag: arm64-kali
609       - tag: arm64-jerma
610       - tag: arm64-iruya
611       - tag: arm64-hunter
612     jobs:
613       - 'functest-kubernetes-{repo}-{container}-{tag}-gate'
614       - 'functest-kubernetes-{repo}-{container}-{tag}-check'
615
616 - project:
617     name: functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-build
618     <<: *functest-kubernetes-params
619     container: functest-kubernetes-benchmarking
620     ref_arg:
621     path: docker/benchmarking
622     exclude:
623       - tag: arm64-latest
624       - tag: arm64-kali
625       - tag: arm64-jerma
626       - tag: arm64-iruya
627       - tag: arm64-hunter
628     jobs:
629       - 'functest-kubernetes-{repo}-{container}-{tag}-gate'
630       - 'functest-kubernetes-{repo}-{container}-{tag}-check'
631
632 - job-template:
633     name: 'functest-kubernetes-{tag}-check'
634     project-type: multijob
635     parameters:
636       - functest-kubernetes-slave:
637           slave: '{slave}'
638       - functest-kubernetes-build_tag:
639           build_tag: ''
640       - functest-kubernetes-branch:
641           branch: '{branch}'
642       - functest-kubernetes-DEPLOY_SCENARIO:
643           DEPLOY_SCENARIO: k8-nosdn-nofeature-noha
644       - functest-kubernetes-DEBUG:
645           DEBUG: 'true'
646     properties:
647       - build-blocker:
648           use-build-blocker: true
649           blocking-level: 'GLOBAL'
650           blocking-jobs:
651             - '^functest-kubernetes(-pi)?-(arm.*-|amd64-)*[a-z]+-(daily|gate|check)$'
652     builders:
653       - multijob:
654           name: remove former images
655           projects:
656             - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-rmi'
657               <<: *functest-kubernetes-jobs
658             - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-rmi'
659               <<: *functest-kubernetes-jobs
660             - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-rmi'
661               <<: *functest-kubernetes-jobs
662             - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-rmi'
663               <<: *functest-kubernetes-jobs
664             - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-rmi'
665               <<: *functest-kubernetes-jobs
666       - multijob:
667           name: remove dependencies
668           projects:
669             - name: 'functest-kubernetes-_-golang-1.15-alpine3.12-rmi'
670               <<: *functest-kubernetes-jobs
671       - multijob:
672           name: pull dependencies
673           projects:
674             - name: 'functest-kubernetes-_-golang-1.15-alpine3.12-pull'
675               <<: *functest-kubernetes-jobs
676       - multijob:
677           name: build opnfv/functest-kubernetes-core
678           projects:
679             - name: 'functest-kubernetes-opnfv-functest-kubernetes-core-{tag}-check'
680               <<: *functest-kubernetes-jobs
681       - multijob:
682           name: build opnfv/functest-kubernetes-healthcheck
683           projects:
684             - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-check'
685               <<: *functest-kubernetes-jobs
686             - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-check'
687               <<: *functest-kubernetes-jobs
688             - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-check'
689               <<: *functest-kubernetes-jobs
690       - multijob:
691           name: build containers
692           projects:
693             - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-check'
694               <<: *functest-kubernetes-jobs
695       - multijob:
696           name: build opnfv/functest-kubernetes-benchmarking
697           projects:
698             - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-check'
699               <<: *functest-kubernetes-jobs
700       - multijob:
701           name: opnfv/functest-kubernetes-healthcheck:{tag}
702           projects:
703             - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-k8s_smoke-run'
704               <<: *functest-kubernetes-jobs
705       - multijob:
706           name: opnfv/functest-kubernetes-smoke:{tag}
707           projects:
708             - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-xrally_kubernetes-run'
709               <<: *functest-kubernetes-jobs
710             - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-k8s_conformance-run'
711               <<: *functest-kubernetes-jobs
712       - multijob:
713           name: opnfv/functest-kubernetes-benchmarking:{tag}
714           projects:
715             - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-xrally_kubernetes_full-run'
716               <<: *functest-kubernetes-jobs
717       - multijob:
718           name: opnfv/functest-kubernetes-security:{tag}
719           projects:
720             - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-kube_hunter-run'
721               <<: *functest-kubernetes-jobs
722             - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-kube_bench-run'
723               <<: *functest-kubernetes-jobs
724       - multijob:
725           name: opnfv/functest-kubernetes-cnf:{tag}
726           projects:
727             - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-k8s_vims-run'
728               <<: *functest-kubernetes-jobs
729
730 - trigger:
731     name: functest-kubernetes-patchset-created
732     triggers:
733       - gerrit:
734           server-name: 'gerrit.opnfv.org'
735           trigger-on:
736             - patchset-created-event
737             - comment-added-contains-event:
738                 comment-contains-value: 'recheck'
739             - comment-added-contains-event:
740                 comment-contains-value: 'reverify'
741           projects:
742             - project-compare-type: 'ANT'
743               project-pattern: 'functest-kubernetes'
744               branches:
745                 - branch-compare-type: 'ANT'
746                   branch-pattern: '**/{branch}'
747           skip-vote:
748             successful: false
749             failed: false
750             unstable: false
751             notbuilt: false
752
753 - job-template:
754     name: 'functest-kubernetes-{tag}-gate'
755     project-type: multijob
756     triggers:
757       - functest-kubernetes-patchset-created:
758           branch: '{branch}'
759     parameters:
760       - functest-kubernetes-slave:
761           slave: '{slave}'
762       - functest-kubernetes-build_tag:
763           build_tag: ''
764       - functest-kubernetes-DEPLOY_SCENARIO:
765           DEPLOY_SCENARIO: k8-nosdn-nofeature-noha
766       - functest-kubernetes-DEBUG:
767           DEBUG: 'true'
768     properties:
769       - build-blocker:
770           use-build-blocker: true
771           blocking-level: 'GLOBAL'
772           blocking-jobs:
773             - '^functest-kubernetes(-pi)?-(arm.*-|amd64-)*[a-z]+-(daily|gate|check)$'
774     builders:
775       - multijob:
776           name: remove former images
777           projects:
778             - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-rmi'
779               <<: *functest-kubernetes-jobs
780             - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-rmi'
781               <<: *functest-kubernetes-jobs
782             - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-rmi'
783               <<: *functest-kubernetes-jobs
784             - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-rmi'
785               <<: *functest-kubernetes-jobs
786             - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-rmi'
787               <<: *functest-kubernetes-jobs
788       - multijob:
789           name: remove dependencies
790           projects:
791             - name: 'functest-kubernetes-_-golang-1.15-alpine3.12-rmi'
792               <<: *functest-kubernetes-jobs
793       - multijob:
794           name: pull dependencies
795           projects:
796             - name: 'functest-kubernetes-_-golang-1.15-alpine3.12-pull'
797               <<: *functest-kubernetes-jobs
798       - multijob:
799           name: build opnfv/functest-kubernetes-core
800           projects:
801             - name: 'functest-kubernetes-opnfv-functest-kubernetes-core-{tag}-gate'
802               <<: *functest-kubernetes-jobs
803       - multijob:
804           name: build opnfv/functest-kubernetes-healthcheck
805           projects:
806             - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-gate'
807               <<: *functest-kubernetes-jobs
808             - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-gate'
809               <<: *functest-kubernetes-jobs
810             - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-gate'
811               <<: *functest-kubernetes-jobs
812       - multijob:
813           name: build containers
814           projects:
815             - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-gate'
816               <<: *functest-kubernetes-jobs
817       - multijob:
818           name: build opnfv/functest-kubernetes-benchmarking
819           projects:
820             - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-gate'
821               <<: *functest-kubernetes-jobs
822       - multijob:
823           name: opnfv/functest-kubernetes-healthcheck:{tag}
824           projects:
825             - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-k8s_smoke-run'
826               <<: *functest-kubernetes-jobs
827       - multijob:
828           name: opnfv/functest-kubernetes-smoke:{tag}
829           projects:
830             - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-xrally_kubernetes-run'
831               <<: *functest-kubernetes-jobs
832             - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-k8s_conformance-run'
833               <<: *functest-kubernetes-jobs
834       - multijob:
835           name: opnfv/functest-kubernetes-security:{tag}
836           projects:
837             - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-kube_hunter-run'
838               <<: *functest-kubernetes-jobs
839             - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-kube_bench-run'
840               <<: *functest-kubernetes-jobs
841       - multijob:
842           name: opnfv/functest-kubernetes-benchmarking:{tag}
843           projects:
844             - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-xrally_kubernetes_full-run'
845               <<: *functest-kubernetes-jobs
846       - multijob:
847           name: opnfv/functest-kubernetes-cnf:{tag}
848           projects:
849             - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-k8s_vims-run'
850               <<: *functest-kubernetes-jobs
851
852 - project:
853     name: 'functest-kubernetes'
854     <<: *functest-kubernetes-params
855     jobs:
856       - 'functest-kubernetes-{tag}-daily'
857
858 - project:
859     name: 'functest-kubernetes-gate'
860     <<: *functest-kubernetes-params
861     exclude:
862       - tag: arm64-latest
863       - tag: arm64-kali
864       - tag: arm64-jerma
865       - tag: arm64-iruya
866       - tag: arm64-hunter
867     jobs:
868       - 'functest-kubernetes-{tag}-check'
869       - 'functest-kubernetes-{tag}-gate'
870
871 - view:
872     name: functest-kubernetes
873     view-type: list
874     columns:
875       - status
876       - weather
877       - job
878       - last-success
879       - last-failure
880       - last-duration
881     regex: ^functest-kubernetes-(arm.*-|amd64-)*[a-z]+-daily$
882
883 - view:
884     name: functest-kubernetes-gate
885     view-type: list
886     columns:
887       - status
888       - weather
889       - job
890       - last-success
891       - last-failure
892       - last-duration
893     regex: ^functest-kubernetes-(arm.*-|amd64-)*[a-z]+-gate$