bfc6824870a9ddb2280e4acb19264516089b520e
[releng.git] / jjb / functest / functest-kubernetes-pi.yaml
1 ---
2 - functest-kubernetes-pi-jobs: &functest-kubernetes-pi-jobs
3     name: 'functest-kubernetes-pi-jobs'
4     current-parameters: true
5
6 - functest-kubernetes-pi-params: &functest-kubernetes-pi-params
7     name: 'functest-kubernetes-pi-params'
8     repo: 'ollivier'
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       - arm-latest:
27           branch: master
28           slave: lf-virtual1-5
29       - arm-kali:
30           branch: stable/kali
31           slave: lf-virtual1-4
32       - arm-jerma:
33           branch: stable/jerma
34           slave: lf-virtual1-3
35       - arm-iruya:
36           branch: stable/iruya
37           slave: lf-virtual1-2
38       - arm-hunter:
39           branch: stable/hunter
40           slave: lf-virtual1-1
41       - arm64-latest:
42           branch: master
43           slave: lf-virtual1-5
44       - arm64-kali:
45           branch: stable/kali
46           slave: lf-virtual1-4
47       - arm64-jerma:
48           branch: stable/jerma
49           slave: lf-virtual1-3
50       - arm64-iruya:
51           branch: stable/iruya
52           slave: lf-virtual1-2
53       - arm64-hunter:
54           branch: stable/hunter
55           slave: lf-virtual1-1
56
57 - parameter:
58     name: functest-kubernetes-pi-slave
59     parameters:
60       - label:
61           name: slave
62           default: '{slave}'
63
64 - parameter:
65     name: functest-kubernetes-pi-build_tag
66     parameters:
67       - random-string:
68           name: build_tag
69
70 - parameter:
71     name: functest-kubernetes-pi-branch
72     parameters:
73       - string:
74           name: branch
75           default: '{branch}'
76
77 - parameter:
78     name: functest-kubernetes-pi-DEPLOY_SCENARIO
79     parameters:
80       - string:
81           name: DEPLOY_SCENARIO
82           default: k8-nosdn-nofeature-noha
83 - parameter:
84     name: functest-kubernetes-pi-DEBUG
85     parameters:
86       - string:
87           name: DEBUG
88           default: 'true'
89
90 - functest-kubernetes-pi-containers: &functest-kubernetes-pi-containers
91     name: 'functest-kubernetes-pi-containers'
92     repo: '{repo}'
93     port: '{port}'
94     container: '{container}'
95     tag: '{tag}'
96
97 - functest-kubernetes-pi-run-containers: &functest-kubernetes-pi-run-containers
98     name: 'functest-kubernetes-pi-run-containers'
99     <<: *functest-kubernetes-pi-containers
100     test: '{test}'
101     privileged: '{privileged}'
102     network: '{network}'
103
104 - builder:
105     name: functest-kubernetes-pi-pull-containers
106     builders:
107       - shell: |
108           set +x
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 pull $image
117
118 - builder:
119     name: functest-kubernetes-pi-run-containers
120     builders:
121       - shell: |
122           set +x
123           [ ! -z "$WORKSPACE" ] && rm -rf $WORKSPACE/* || true
124           if [ "{repo}" = "_" ]; then
125             image={container}:{tag}
126           elif [ "{port}" = "None" ]; then
127             image={repo}/{container}:{tag}
128           else
129             image={repo}:{port}/{container}:{tag}
130           fi
131           docker run --rm \
132             --privileged={privileged} \
133             --network={network} \
134             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
135             -e S3_DST_URL=s3://artifacts.opnfv.org/functest-kubernetes/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
136             -e HTTP_DST_URL=http://artifacts.opnfv.org/functest-kubernetes/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
137             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
138             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
139             -e NODE_NAME=$slave \
140             -e BUILD_TAG=$BUILD_TAG \
141             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
142             -e DEPLOY_SCENARIO=$DEPLOY_SCENARIO \
143             -e DEBUG=$DEBUG \
144             -v /home/opnfv/functest-kubernetes/config.{tag}:/root/.kube/config \
145             -v /home/opnfv/functest-kubernetes/.boto:/root/.boto \
146             $image run_tests -t {test} -p -r
147
148 - builder:
149     name: functest-kubernetes-pi-remove-images
150     builders:
151       - shell: |
152           set +x
153           if [ "{repo}" = "_" ]; then
154             image={container}:{tag}
155           elif [ "{port}" = "None" ]; then
156             image={repo}/{container}:{tag}
157           else
158             image={repo}:{port}/{container}:{tag}
159           fi
160           docker rmi $image || true
161
162
163 - job-template:
164     name: 'functest-kubernetes-pi-{repo}-{container}-{tag}-pull'
165     parameters:
166       - functest-kubernetes-pi-slave:
167           slave: '{slave}'
168     builders:
169       - functest-kubernetes-pi-pull-containers:
170           <<: *functest-kubernetes-pi-containers
171
172 - project:
173     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-healthcheck-pull'
174     <<: *functest-kubernetes-pi-params
175     container: 'functest-kubernetes-healthcheck'
176     exclude:
177       - tag: arm-hunter
178       - tag: arm64-hunter
179     jobs:
180       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-pull'
181
182 - project:
183     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke-pull'
184     <<: *functest-kubernetes-pi-params
185     container: 'functest-kubernetes-smoke'
186     exclude:
187       - tag: arm-hunter
188       - tag: arm64-hunter
189     jobs:
190       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-pull'
191
192 - project:
193     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-security-pull'
194     <<: *functest-kubernetes-pi-params
195     container: 'functest-kubernetes-security'
196     jobs:
197       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-pull'
198
199 - project:
200     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-benchmarking-pull'
201     <<: *functest-kubernetes-pi-params
202     container: 'functest-kubernetes-benchmarking'
203     exclude:
204       - tag: arm-hunter
205       - tag: arm64-hunter
206     jobs:
207       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-pull'
208
209 - project:
210     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-cnf-pull'
211     <<: *functest-kubernetes-pi-params
212     container: 'functest-kubernetes-cnf'
213     jobs:
214       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-pull'
215
216 - job-template:
217     name: 'functest-kubernetes-pi-{repo}-{container}-{tag}-rmi'
218     parameters:
219       - functest-kubernetes-pi-slave:
220           slave: '{slave}'
221     builders:
222       - functest-kubernetes-pi-remove-images:
223           <<: *functest-kubernetes-pi-containers
224
225 - project:
226     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-healthcheck-rmi'
227     <<: *functest-kubernetes-pi-params
228     container: 'functest-kubernetes-healthcheck'
229     exclude:
230       - tag: arm-hunter
231       - tag: arm64-hunter
232     jobs:
233       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-rmi'
234
235 - project:
236     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke-rmi'
237     <<: *functest-kubernetes-pi-params
238     container: 'functest-kubernetes-smoke'
239     exclude:
240       - tag: arm-hunter
241       - tag: arm64-hunter
242     jobs:
243       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-rmi'
244
245 - project:
246     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-security-rmi'
247     <<: *functest-kubernetes-pi-params
248     container: 'functest-kubernetes-security'
249     jobs:
250       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-rmi'
251
252 - project:
253     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-benchmarking-rmi'
254     <<: *functest-kubernetes-pi-params
255     container: 'functest-kubernetes-benchmarking'
256     exclude:
257       - tag: arm-hunter
258       - tag: arm64-hunter
259     jobs:
260       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-rmi'
261
262 - project:
263     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-cnf-rmi'
264     <<: *functest-kubernetes-pi-params
265     container: 'functest-kubernetes-cnf'
266     jobs:
267       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-rmi'
268
269 - job-template:
270     name: 'functest-kubernetes-pi-{repo}-{container}-{tag}-{test}-run'
271     parameters:
272       - functest-kubernetes-pi-slave:
273           slave: '{slave}'
274       - functest-kubernetes-pi-build_tag:
275           build_tag: ''
276       - functest-kubernetes-pi-DEPLOY_SCENARIO:
277           DEPLOY_SCENARIO: k8-nosdn-nofeature-noha
278       - functest-kubernetes-pi-DEBUG:
279           DEBUG: 'true'
280     builders:
281       - functest-kubernetes-pi-run-containers:
282           <<: *functest-kubernetes-pi-run-containers
283
284 - project:
285     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-healthcheck'
286     <<: *functest-kubernetes-pi-params
287     container: 'functest-kubernetes-healthcheck'
288     test:
289       - k8s_smoke
290     exclude:
291       - tag: arm-hunter
292       - tag: arm64-hunter
293     privileged: 'false'
294     network: bridge
295     jobs:
296       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-{test}-run'
297
298 - project:
299     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke'
300     <<: *functest-kubernetes-pi-params
301     container: 'functest-kubernetes-smoke'
302     test:
303       - xrally_kubernetes
304       - k8s_conformance
305     exclude:
306       - tag: arm-hunter
307       - tag: arm64-hunter
308     privileged: 'false'
309     network: bridge
310     jobs:
311       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-{test}-run'
312
313 - project:
314     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-security'
315     <<: *functest-kubernetes-pi-params
316     container: 'functest-kubernetes-security'
317     test:
318       - kube_hunter
319       - kube_bench
320     privileged: 'false'
321     network: bridge
322     jobs:
323       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-{test}-run'
324
325 - project:
326     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-benchmarking'
327     <<: *functest-kubernetes-pi-params
328     container: 'functest-kubernetes-benchmarking'
329     test:
330       - xrally_kubernetes_full
331     exclude:
332       - tag: arm-hunter
333       - tag: arm64-hunter
334     privileged: 'false'
335     network: bridge
336     jobs:
337       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-{test}-run'
338
339 - project:
340     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-cnf'
341     <<: *functest-kubernetes-pi-params
342     container: 'functest-kubernetes-cnf'
343     test:
344       - k8s_vims
345     exclude:
346       - tag: kali
347         test: cnf_conformance
348       - tag: jerma
349         test: cnf_conformance
350       - tag: iruya
351         test: cnf_conformance
352       - tag: hunter
353         test: cnf_conformance
354       - tag: arm-latest
355         test: cnf_conformance
356       - tag: arm-kali
357         test: cnf_conformance
358       - tag: arm-jerma
359         test: cnf_conformance
360       - tag: arm-iruya
361         test: cnf_conformance
362       - tag: arm-hunter
363         test: cnf_conformance
364       - tag: arm64-latest
365         test: cnf_conformance
366       - tag: arm64-kali
367         test: cnf_conformance
368       - tag: arm64-kali
369         test: cnf_conformance
370       - tag: arm64-jerma
371         test: cnf_conformance
372       - tag: arm64-iruya
373         test: cnf_conformance
374       - tag: arm64-hunter
375         test: cnf_conformance
376     privileged: 'false'
377     network: bridge
378     jobs:
379       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-{test}-run'
380
381
382 - builder:
383     name: functest-kubernetes-pi-zip
384     builders:
385       - shell: |
386           set +x
387           [ ! -z "$WORKSPACE" ] && rm -rf $WORKSPACE/* || true
388           if [ "{repo}" = "_" ]; then
389             image={container}:{tag}
390           elif [ "{port}" = "None" ]; then
391             image={repo}/{container}:{tag}
392           else
393             image={repo}:{port}/{container}:{tag}
394           fi
395           docker run --rm \
396             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
397             -e S3_DST_URL=s3://artifacts.opnfv.org/functest-kubernetes \
398             -e HTTP_DST_URL=http://artifacts.opnfv.org/functest-kubernetes \
399             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
400             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
401             -e BUILD_TAG=$BUILD_TAG \
402             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
403             -e DEPLOY_SCENARIO=$DEPLOY_SCENARIO \
404             -e DEBUG=$DEBUG \
405             -v /home/opnfv/functest-kubernetes/config.{tag}:/root/.kube/config \
406             -v /home/opnfv/functest-kubernetes/.boto:/root/.boto \
407             $image zip_campaign
408
409 - job-template:
410     name: 'functest-kubernetes-pi-{tag}-zip'
411     parameters:
412       - functest-kubernetes-pi-slave:
413           slave: '{slave}'
414       - functest-kubernetes-pi-build_tag:
415           build_tag: ''
416       - functest-kubernetes-pi-DEPLOY_SCENARIO:
417           DEPLOY_SCENARIO: k8-nosdn-nofeature-noha
418       - functest-kubernetes-pi-DEBUG:
419           DEBUG: 'true'
420     builders:
421       - functest-kubernetes-pi-zip:
422           <<: *functest-kubernetes-pi-containers
423
424 - project:
425     name: 'functest-kubernetes-pi-{tag}-zip'
426     <<: *functest-kubernetes-pi-params
427     container: 'functest-kubernetes-security'
428     jobs:
429       - 'functest-kubernetes-pi-{tag}-zip'
430
431 - job-template:
432     name: 'functest-kubernetes-pi-{tag}-daily'
433     project-type: multijob
434     triggers:
435       - timed: '@weekly'
436     parameters:
437       - functest-kubernetes-pi-slave:
438           slave: '{slave}'
439       - functest-kubernetes-pi-build_tag:
440           build_tag: ''
441       - functest-kubernetes-pi-DEPLOY_SCENARIO:
442           DEPLOY_SCENARIO: k8-nosdn-nofeature-noha
443       - functest-kubernetes-pi-DEBUG:
444           DEBUG: 'true'
445     properties:
446       - build-blocker:
447           use-build-blocker: true
448           blocking-level: 'GLOBAL'
449           blocking-jobs:
450             - '^functest-kubernetes(-pi)?-(arm.*-|amd64-)*[a-z]+-(daily|gate|check)$'
451     builders:
452       - multijob:
453           name: remove former images
454           projects:
455             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-healthcheck-{tag}-rmi'
456               <<: *functest-kubernetes-pi-jobs
457             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke-{tag}-rmi'
458               <<: *functest-kubernetes-pi-jobs
459             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-security-{tag}-rmi'
460               <<: *functest-kubernetes-pi-jobs
461             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-benchmarking-{tag}-rmi'
462               <<: *functest-kubernetes-pi-jobs
463             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-cnf-{tag}-rmi'
464               <<: *functest-kubernetes-pi-jobs
465       - multijob:
466           name: pull containers
467           projects:
468             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-healthcheck-{tag}-pull'
469               <<: *functest-kubernetes-pi-jobs
470             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke-{tag}-pull'
471               <<: *functest-kubernetes-pi-jobs
472             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-security-{tag}-pull'
473               <<: *functest-kubernetes-pi-jobs
474             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-benchmarking-{tag}-pull'
475               <<: *functest-kubernetes-pi-jobs
476             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-cnf-{tag}-pull'
477               <<: *functest-kubernetes-pi-jobs
478       - multijob:
479           name: ollivier/functest-kubernetes-healthcheck:{tag}
480           projects:
481             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-healthcheck-{tag}-k8s_smoke-run'
482               <<: *functest-kubernetes-pi-jobs
483       - multijob:
484           name: ollivier/functest-kubernetes-smoke:{tag}
485           projects:
486             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke-{tag}-xrally_kubernetes-run'
487               <<: *functest-kubernetes-pi-jobs
488             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke-{tag}-k8s_conformance-run'
489               <<: *functest-kubernetes-pi-jobs
490       - multijob:
491           name: ollivier/functest-kubernetes-security:{tag}
492           projects:
493             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-security-{tag}-kube_hunter-run'
494               <<: *functest-kubernetes-pi-jobs
495             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-security-{tag}-kube_bench-run'
496               <<: *functest-kubernetes-pi-jobs
497       - multijob:
498           name: ollivier/functest-kubernetes-benchmarking:{tag}
499           projects:
500             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-benchmarking-{tag}-xrally_kubernetes_full-run'
501               <<: *functest-kubernetes-pi-jobs
502       - multijob:
503           name: ollivier/functest-kubernetes-cnf:{tag}
504           projects:
505             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-cnf-{tag}-cnf_conformance-run'
506               <<: *functest-kubernetes-pi-jobs
507             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-cnf-{tag}-k8s_vims-run'
508               <<: *functest-kubernetes-pi-jobs
509       - multijob:
510           name: dump all campaign data
511           projects:
512             - name: 'functest-kubernetes-pi-{tag}-zip'
513               <<: *functest-kubernetes-pi-jobs
514
515
516 - project:
517     name: 'functest-kubernetes-pi'
518     <<: *functest-kubernetes-pi-params
519     jobs:
520       - 'functest-kubernetes-pi-{tag}-daily'
521
522 - view:
523     name: functest-kubernetes-pi
524     view-type: list
525     columns:
526       - status
527       - weather
528       - job
529       - last-success
530       - last-failure
531       - last-duration
532     regex: ^functest-kubernetes-pi-(arm.*-|amd64-)*[a-z]+-daily$