c22320277188edbee82c26727562e84c98b2e1e1
[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-cnf-pull'
201     <<: *functest-kubernetes-pi-params
202     container: 'functest-kubernetes-cnf'
203     jobs:
204       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-pull'
205
206 - job-template:
207     name: 'functest-kubernetes-pi-{repo}-{container}-{tag}-rmi'
208     parameters:
209       - functest-kubernetes-pi-slave:
210           slave: '{slave}'
211     builders:
212       - functest-kubernetes-pi-remove-images:
213           <<: *functest-kubernetes-pi-containers
214
215 - project:
216     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-healthcheck-rmi'
217     <<: *functest-kubernetes-pi-params
218     container: 'functest-kubernetes-healthcheck'
219     exclude:
220       - tag: arm-hunter
221       - tag: arm64-hunter
222     jobs:
223       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-rmi'
224
225 - project:
226     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke-rmi'
227     <<: *functest-kubernetes-pi-params
228     container: 'functest-kubernetes-smoke'
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-security-rmi'
237     <<: *functest-kubernetes-pi-params
238     container: 'functest-kubernetes-security'
239     jobs:
240       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-rmi'
241
242 - project:
243     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-cnf-rmi'
244     <<: *functest-kubernetes-pi-params
245     container: 'functest-kubernetes-cnf'
246     jobs:
247       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-rmi'
248
249 - job-template:
250     name: 'functest-kubernetes-pi-{repo}-{container}-{tag}-{test}-run'
251     parameters:
252       - functest-kubernetes-pi-slave:
253           slave: '{slave}'
254       - functest-kubernetes-pi-build_tag:
255           build_tag: ''
256       - functest-kubernetes-pi-DEPLOY_SCENARIO:
257           DEPLOY_SCENARIO: k8-nosdn-nofeature-noha
258       - functest-kubernetes-pi-DEBUG:
259           DEBUG: 'true'
260     builders:
261       - functest-kubernetes-pi-run-containers:
262           <<: *functest-kubernetes-pi-run-containers
263
264 - project:
265     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-healthcheck'
266     <<: *functest-kubernetes-pi-params
267     container: 'functest-kubernetes-healthcheck'
268     test:
269       - k8s_smoke
270     exclude:
271       - tag: arm-hunter
272       - tag: arm64-hunter
273     privileged: 'false'
274     network: bridge
275     jobs:
276       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-{test}-run'
277
278 - project:
279     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke'
280     <<: *functest-kubernetes-pi-params
281     container: 'functest-kubernetes-smoke'
282     test:
283       - xrally_kubernetes
284       - k8s_conformance
285     exclude:
286       - tag: arm-hunter
287       - tag: arm64-hunter
288     privileged: 'false'
289     network: bridge
290     jobs:
291       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-{test}-run'
292
293 - project:
294     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-security'
295     <<: *functest-kubernetes-pi-params
296     container: 'functest-kubernetes-security'
297     test:
298       - kube_hunter
299       - kube_bench
300     privileged: 'false'
301     network: bridge
302     jobs:
303       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-{test}-run'
304
305 - project:
306     name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-cnf'
307     <<: *functest-kubernetes-pi-params
308     container: 'functest-kubernetes-cnf'
309     test:
310       - k8s_vims
311     privileged: 'false'
312     network: bridge
313     jobs:
314       - 'functest-kubernetes-pi-{repo}-{container}-{tag}-{test}-run'
315
316
317 - builder:
318     name: functest-kubernetes-pi-zip
319     builders:
320       - shell: |
321           set +x
322           [ ! -z "$WORKSPACE" ] && rm -rf $WORKSPACE/* || true
323           if [ "{repo}" = "_" ]; then
324             image={container}:{tag}
325           elif [ "{port}" = "None" ]; then
326             image={repo}/{container}:{tag}
327           else
328             image={repo}:{port}/{container}:{tag}
329           fi
330           docker run --rm \
331             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
332             -e S3_DST_URL=s3://artifacts.opnfv.org/functest-kubernetes \
333             -e HTTP_DST_URL=http://artifacts.opnfv.org/functest-kubernetes \
334             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
335             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
336             -e BUILD_TAG=$BUILD_TAG \
337             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
338             -e DEPLOY_SCENARIO=$DEPLOY_SCENARIO \
339             -e DEBUG=$DEBUG \
340             -v /home/opnfv/functest-kubernetes/config.{tag}:/root/.kube/config \
341             -v /home/opnfv/functest-kubernetes/.boto:/root/.boto \
342             $image zip_campaign
343
344 - job-template:
345     name: 'functest-kubernetes-pi-{tag}-zip'
346     parameters:
347       - functest-kubernetes-pi-slave:
348           slave: '{slave}'
349       - functest-kubernetes-pi-build_tag:
350           build_tag: ''
351       - functest-kubernetes-pi-DEPLOY_SCENARIO:
352           DEPLOY_SCENARIO: k8-nosdn-nofeature-noha
353       - functest-kubernetes-pi-DEBUG:
354           DEBUG: 'true'
355     builders:
356       - functest-kubernetes-pi-zip:
357           <<: *functest-kubernetes-pi-containers
358
359 - project:
360     name: 'functest-kubernetes-pi-{tag}-zip'
361     <<: *functest-kubernetes-pi-params
362     container: 'functest-kubernetes-security'
363     jobs:
364       - 'functest-kubernetes-pi-{tag}-zip'
365
366 - job-template:
367     name: 'functest-kubernetes-pi-{tag}-daily'
368     project-type: multijob
369     triggers:
370       - timed: '@daily'
371     parameters:
372       - functest-kubernetes-pi-slave:
373           slave: '{slave}'
374       - functest-kubernetes-pi-build_tag:
375           build_tag: ''
376       - functest-kubernetes-pi-DEPLOY_SCENARIO:
377           DEPLOY_SCENARIO: k8-nosdn-nofeature-noha
378       - functest-kubernetes-pi-DEBUG:
379           DEBUG: 'true'
380     properties:
381       - build-blocker:
382           use-build-blocker: true
383           blocking-level: 'NODE'
384           blocking-jobs:
385             - '^functest-kubernetes(-pi)?-(arm.*-|amd64-)*[a-z]+-(daily|gate|check)$'
386     builders:
387       - multijob:
388           name: remove former images
389           projects:
390             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-healthcheck-{tag}-rmi'
391               <<: *functest-kubernetes-pi-jobs
392             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke-{tag}-rmi'
393               <<: *functest-kubernetes-pi-jobs
394             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-security-{tag}-rmi'
395               <<: *functest-kubernetes-pi-jobs
396             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-cnf-{tag}-rmi'
397               <<: *functest-kubernetes-pi-jobs
398       - multijob:
399           name: pull containers
400           projects:
401             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-healthcheck-{tag}-pull'
402               <<: *functest-kubernetes-pi-jobs
403             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke-{tag}-pull'
404               <<: *functest-kubernetes-pi-jobs
405             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-security-{tag}-pull'
406               <<: *functest-kubernetes-pi-jobs
407             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-cnf-{tag}-pull'
408               <<: *functest-kubernetes-pi-jobs
409       - multijob:
410           name: ollivier/functest-kubernetes-healthcheck:{tag}
411           projects:
412             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-healthcheck-{tag}-k8s_smoke-run'
413               <<: *functest-kubernetes-pi-jobs
414       - multijob:
415           name: ollivier/functest-kubernetes-smoke:{tag}
416           projects:
417             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke-{tag}-xrally_kubernetes-run'
418               <<: *functest-kubernetes-pi-jobs
419             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-smoke-{tag}-k8s_conformance-run'
420               <<: *functest-kubernetes-pi-jobs
421       - multijob:
422           name: ollivier/functest-kubernetes-security:{tag}
423           projects:
424             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-security-{tag}-kube_hunter-run'
425               <<: *functest-kubernetes-pi-jobs
426             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-security-{tag}-kube_bench-run'
427               <<: *functest-kubernetes-pi-jobs
428       - multijob:
429           name: ollivier/functest-kubernetes-cnf:{tag}
430           projects:
431             - name: 'functest-kubernetes-pi-ollivier-functest-kubernetes-cnf-{tag}-k8s_vims-run'
432               <<: *functest-kubernetes-pi-jobs
433       - multijob:
434           name: dump all campaign data
435           projects:
436             - name: 'functest-kubernetes-pi-{tag}-zip'
437               <<: *functest-kubernetes-pi-jobs
438
439
440 - project:
441     name: 'functest-kubernetes-pi'
442     <<: *functest-kubernetes-pi-params
443     jobs:
444       - 'functest-kubernetes-pi-{tag}-daily'
445
446 - view:
447     name: functest-kubernetes-pi
448     view-type: list
449     columns:
450       - status
451       - weather
452       - job
453       - last-success
454       - last-failure
455       - last-duration
456     regex: ^functest-kubernetes-pi-(arm.*-|amd64-)*[a-z]+-daily$