Merge "Improve kuberef lint script"
[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     privileged: 'false'
346     network: bridge
347     jobs:
348       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-{test}-run'
349
350
351 - builder:
352     name: functest-kubernetes-pi-zip
353     builders:
354       - shell: |
355           set +x
356           [ ! -z "$WORKSPACE" ] && rm -rf $WORKSPACE/* || true
357           if [ "{repo}" = "_" ]; then
358             image={container}:{tag}
359           elif [ "{port}" = "None" ]; then
360             image={repo}/{container}:{tag}
361           else
362             image={repo}:{port}/{container}:{tag}
363           fi
364           docker run --rm \
365             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
366             -e S3_DST_URL=s3://artifacts.opnfv.org/functest-kubernetes \
367             -e HTTP_DST_URL=http://artifacts.opnfv.org/functest-kubernetes \
368             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
369             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
370             -e BUILD_TAG=$BUILD_TAG \
371             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
372             -e DEPLOY_SCENARIO=$DEPLOY_SCENARIO \
373             -e DEBUG=$DEBUG \
374             -v /home/opnfv/functest-kubernetes/config.{tag}:/root/.kube/config \
375             -v /home/opnfv/functest-kubernetes/.boto:/root/.boto \
376             $image zip_campaign
377
378 - job-template:
379     name: 'functest-kubernetes-pi-{tag}-zip'
380     parameters:
381       - functest-kubernetes-pi-slave:
382           slave: '{slave}'
383       - functest-kubernetes-pi-build_tag:
384           build_tag: ''
385       - functest-kubernetes-pi-DEPLOY_SCENARIO:
386           DEPLOY_SCENARIO: k8-nosdn-nofeature-noha
387       - functest-kubernetes-pi-DEBUG:
388           DEBUG: 'true'
389     builders:
390       - functest-kubernetes-pi-zip:
391           <<: *functest-kubernetes-pi-containers
392
393 - project:
394     name: 'functest-kubernetes-pi-{tag}-zip'
395     <<: *functest-kubernetes-pi-params
396     container: 'functest-kubernetes-security'
397     jobs:
398       - 'functest-kubernetes-pi-{tag}-zip'
399
400 - job-template:
401     name: 'functest-kubernetes-pi-{tag}-daily'
402     project-type: multijob
403     triggers:
404       - timed: '@weekly'
405     parameters:
406       - functest-kubernetes-pi-slave:
407           slave: '{slave}'
408       - functest-kubernetes-pi-build_tag:
409           build_tag: ''
410       - functest-kubernetes-pi-DEPLOY_SCENARIO:
411           DEPLOY_SCENARIO: k8-nosdn-nofeature-noha
412       - functest-kubernetes-pi-DEBUG:
413           DEBUG: 'true'
414     properties:
415       - build-blocker:
416           use-build-blocker: true
417           blocking-level: 'GLOBAL'
418           blocking-jobs:
419             - '^functest-kubernetes(-pi)?-(arm.*-|amd64-)*[a-z]+-(daily|gate|check)$'
420     builders:
421       - multijob:
422           name: remove former images
423           projects:
424             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-healthcheck-{tag}-rmi'
425               <<: *functest-kubernetes-pi-jobs
426             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke-{tag}-rmi'
427               <<: *functest-kubernetes-pi-jobs
428             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-security-{tag}-rmi'
429               <<: *functest-kubernetes-pi-jobs
430             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-benchmarking-{tag}-rmi'
431               <<: *functest-kubernetes-pi-jobs
432             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-cnf-{tag}-rmi'
433               <<: *functest-kubernetes-pi-jobs
434       - multijob:
435           name: pull containers
436           projects:
437             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-healthcheck-{tag}-pull'
438               <<: *functest-kubernetes-pi-jobs
439             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke-{tag}-pull'
440               <<: *functest-kubernetes-pi-jobs
441             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-security-{tag}-pull'
442               <<: *functest-kubernetes-pi-jobs
443             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-benchmarking-{tag}-pull'
444               <<: *functest-kubernetes-pi-jobs
445             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-cnf-{tag}-pull'
446               <<: *functest-kubernetes-pi-jobs
447       - multijob:
448           name: ollivier/functest-kubernetes-healthcheck:{tag}
449           projects:
450             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-healthcheck-{tag}-k8s_smoke-run'
451               <<: *functest-kubernetes-pi-jobs
452       - multijob:
453           name: ollivier/functest-kubernetes-smoke:{tag}
454           projects:
455             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke-{tag}-xrally_kubernetes-run'
456               <<: *functest-kubernetes-pi-jobs
457             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke-{tag}-k8s_conformance-run'
458               <<: *functest-kubernetes-pi-jobs
459       - multijob:
460           name: ollivier/functest-kubernetes-security:{tag}
461           projects:
462             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-security-{tag}-kube_hunter-run'
463               <<: *functest-kubernetes-pi-jobs
464             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-security-{tag}-kube_bench-run'
465               <<: *functest-kubernetes-pi-jobs
466       - multijob:
467           name: ollivier/functest-kubernetes-benchmarking:{tag}
468           projects:
469             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-benchmarking-{tag}-xrally_kubernetes_full-run'
470               <<: *functest-kubernetes-pi-jobs
471       - multijob:
472           name: ollivier/functest-kubernetes-cnf:{tag}
473           projects:
474             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-cnf-{tag}-k8s_vims-run'
475               <<: *functest-kubernetes-pi-jobs
476       - multijob:
477           name: dump all campaign data
478           projects:
479             - name: 'functest-kubernetes-pi-{tag}-zip'
480               <<: *functest-kubernetes-pi-jobs
481
482
483 - project:
484     name: 'functest-kubernetes-pi'
485     <<: *functest-kubernetes-pi-params
486     jobs:
487       - 'functest-kubernetes-pi-{tag}-daily'
488
489 - view:
490     name: functest-kubernetes-pi
491     view-type: list
492     columns:
493       - status
494       - weather
495       - job
496       - last-success
497       - last-failure
498       - last-duration
499     regex: ^functest-kubernetes-pi-(arm.*-|amd64-)*[a-z]+-daily$