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