Skip k8s_vims iruya gating
[releng.git] / jjb / functest / xtesting.yaml
1 ---
2 - xtesting-jobs: &xtesting-jobs
3     name: 'xtesting-jobs'
4     current-parameters: true
5
6 - xtesting-params: &xtesting-params
7     name: 'xtesting-params'
8     repo: 'opnfv'
9     port:
10     tag:
11       - latest:
12           branch: master
13           slave: lf-virtual1
14       - kali:
15           branch: stable/kali
16           slave: lf-virtual1
17       - jerma:
18           branch: stable/jerma
19           slave: lf-virtual1
20       - iruya:
21           branch: stable/iruya
22           slave: lf-virtual1
23       - hunter:
24           branch: stable/hunter
25           slave: lf-virtual1
26       - arm64-latest:
27           branch: master
28           slave: lf-virtual1
29       - arm64-kali:
30           branch: stable/kali
31           slave: lf-virtual1
32       - arm64-jerma:
33           branch: stable/jerma
34           slave: lf-virtual1
35       - arm64-iruya:
36           branch: stable/iruya
37           slave: lf-virtual1
38       - arm64-hunter:
39           branch: stable/hunter
40           slave: lf-virtual1
41
42 - parameter:
43     name: xtesting-slave
44     parameters:
45       - label:
46           name: slave
47           default: '{slave}'
48
49 - parameter:
50     name: xtesting-build_tag
51     parameters:
52       - random-string:
53           name: build_tag
54
55 - parameter:
56     name: xtesting-branch
57     parameters:
58       - string:
59           name: branch
60           default: '{branch}'
61
62 - parameter:
63     name: xtesting-DEBUG
64     parameters:
65       - string:
66           name: DEBUG
67           default: 'true'
68
69 - xtesting-containers: &xtesting-containers
70     name: 'xtesting-containers'
71     repo: '{repo}'
72     port: '{port}'
73     container: '{container}'
74     tag: '{tag}'
75
76 - xtesting-run-containers: &xtesting-run-containers
77     name: 'xtesting-run-containers'
78     <<: *xtesting-containers
79     test: '{test}'
80     privileged: '{privileged}'
81     network: '{network}'
82
83 - builder:
84     name: xtesting-pull-containers
85     builders:
86       - shell: |
87           set +x
88           if [ "{repo}" = "_" ]; then
89             image={container}:{tag}
90           elif [ "{port}" = "None" ]; then
91             image={repo}/{container}:{tag}
92           else
93             image={repo}:{port}/{container}:{tag}
94           fi
95           sudo docker pull $image
96
97 - builder:
98     name: xtesting-run-containers
99     builders:
100       - shell: |
101           set +x
102           [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/* || true
103           if [ "{repo}" = "_" ]; then
104             image={container}:{tag}
105           elif [ "{port}" = "None" ]; then
106             image={repo}/{container}:{tag}
107           else
108             image={repo}:{port}/{container}:{tag}
109           fi
110           sudo docker run --rm \
111             --privileged={privileged} \
112             --network={network} \
113             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
114             -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
115             -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
116             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
117             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
118             -e NODE_NAME=$slave \
119             -e BUILD_TAG=$BUILD_TAG \
120             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
121             -e DEBUG=$DEBUG \
122             -v /home/opnfv/xtesting/.boto:/root/.boto \
123             $image run_tests -t {test} -p -r
124
125 - builder:
126     name: xtesting-remove-images
127     builders:
128       - shell: |
129           set +x
130           if [ "{repo}" = "_" ]; then
131             image={container}:{tag}
132           elif [ "{port}" = "None" ]; then
133             image={repo}/{container}:{tag}
134           else
135             image={repo}:{port}/{container}:{tag}
136           fi
137           sudo docker rmi $image || true
138
139 - xtesting-build-containers: &xtesting-build-containers
140     name: 'xtesting-build-containers'
141     <<: *xtesting-containers
142     ref_arg: '{ref_arg}'
143     path: '{path}'
144
145 - builder:
146     name: xtesting-build-containers
147     builders:
148       - shell: |
149           set +x
150           if [ "{repo}" = "_" ]; then
151             image={container}:{tag}
152           elif [ "{port}" = "None" ]; then
153             image={repo}/{container}:{tag}
154           else
155             image={repo}:{port}/{container}:{tag}
156           fi
157           if [ "{ref_arg}" = "None" ]; then
158             build_arg=""
159           else
160             build_arg="--build-arg {ref_arg}={ref}"
161           fi
162           case {tag} in
163           *latest)
164             cd {path};;
165           *)
166             cd docker;;
167           esac
168           sudo docker build $build_arg \
169             --pull=false --no-cache --force-rm=true \
170             -t $image .
171
172 - scm:
173     name: xtesting-scm
174     scm:
175       - git:
176           url: https://gerrit.opnfv.org/gerrit/functest-xtesting
177           refspec: '+refs/changes/*:refs/changes/*'
178           branches:
179             - '{ref}'
180
181 - job-template:
182     name: 'xtesting-{repo}-{container}-{tag}-pull'
183     parameters:
184       - xtesting-slave:
185           slave: '{slave}'
186     builders:
187       - xtesting-pull-containers:
188           <<: *xtesting-containers
189
190 - project:
191     name: 'xtesting-opnfv-xtesting-pull'
192     <<: *xtesting-params
193     container: 'xtesting'
194     jobs:
195       - 'xtesting-{repo}-{container}-{tag}-pull'
196
197 - project:
198     name: 'xtesting-opnfv-xtesting-mts-pull'
199     <<: *xtesting-params
200     container: 'xtesting-mts'
201     exclude:
202       - tag: hunter
203       - tag: iruya
204       - tag: jerma
205       - tag: kali
206       - tag: arm64-hunter
207       - tag: arm64-iruya
208       - tag: arm64-jerma
209       - tag: arm64-kali
210     jobs:
211       - 'xtesting-{repo}-{container}-{tag}-pull'
212
213 - job-template:
214     name: 'xtesting-{repo}-{container}-{tag}-rmi'
215     parameters:
216       - xtesting-slave:
217           slave: '{slave}'
218     builders:
219       - xtesting-remove-images:
220           <<: *xtesting-containers
221
222 - project:
223     name: 'xtesting-opnfv-xtesting-rmi'
224     <<: *xtesting-params
225     container: 'xtesting'
226     jobs:
227       - 'xtesting-{repo}-{container}-{tag}-rmi'
228
229 - project:
230     name: 'xtesting-opnfv-xtesting-mts-rmi'
231     <<: *xtesting-params
232     container: 'xtesting-mts'
233     exclude:
234       - tag: hunter
235       - tag: iruya
236       - tag: jerma
237       - tag: kali
238       - tag: arm64-hunter
239       - tag: arm64-iruya
240       - tag: arm64-jerma
241       - tag: arm64-kali
242     jobs:
243       - 'xtesting-{repo}-{container}-{tag}-rmi'
244
245 - job-template:
246     name: 'xtesting-{repo}-{container}-{tag}-{test}-run'
247     parameters:
248       - xtesting-slave:
249           slave: '{slave}'
250       - xtesting-build_tag:
251           build_tag: ''
252       - xtesting-DEBUG:
253           DEBUG: 'true'
254     builders:
255       - xtesting-run-containers:
256           <<: *xtesting-run-containers
257
258 - project:
259     name: 'xtesting-opnfv-xtesting'
260     <<: *xtesting-params
261     container: 'xtesting'
262     test:
263       - first
264       - second
265       - third
266       - fourth
267       - fifth
268       - sixth
269     exclude:
270       - tag: hunter
271         test: sixth
272       - tag: iruya
273         test: sixth
274       - tag: arm64-hunter
275         test: sixth
276       - tag: arm64-iruya
277         test: sixth
278     privileged: 'false'
279     network: bridge
280     jobs:
281       - 'xtesting-{repo}-{container}-{tag}-{test}-run'
282
283 - project:
284     name: 'xtesting-opnfv-xtesting-mts'
285     <<: *xtesting-params
286     container: 'xtesting-mts'
287     test:
288       - seventh
289     exclude:
290       - tag: hunter
291         test: seventh
292       - tag: iruya
293         test: seventh
294       - tag: jerma
295         test: seventh
296       - tag: kali
297         test: seventh
298       - tag: arm64-hunter
299         test: seventh
300       - tag: arm64-iruya
301         test: seventh
302       - tag: arm64-jerma
303         test: seventh
304       - tag: arm64-kali
305         test: seventh
306     privileged: 'false'
307     network: bridge
308     jobs:
309       - 'xtesting-{repo}-{container}-{tag}-{test}-run'
310
311 - builder:
312     name: xtesting-zip
313     builders:
314       - shell: |
315           set +x
316           [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/* || true
317           if [ "{repo}" = "_" ]; then
318             image={container}:{tag}
319           elif [ "{port}" = "None" ]; then
320             image={repo}/{container}:{tag}
321           else
322             image={repo}:{port}/{container}:{tag}
323           fi
324           sudo docker run --rm \
325             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
326             -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
327             -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
328             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
329             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
330             -e BUILD_TAG=$BUILD_TAG \
331             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
332             -e DEBUG=$DEBUG \
333             -v /home/opnfv/xtesting/.boto:/root/.boto \
334             $image zip_campaign
335
336 - job-template:
337     name: 'xtesting-{tag}-zip'
338     parameters:
339       - xtesting-slave:
340           slave: '{slave}'
341       - xtesting-build_tag:
342           build_tag: ''
343       - xtesting-DEBUG:
344           DEBUG: 'true'
345     builders:
346       - xtesting-zip:
347           <<: *xtesting-containers
348
349 - project:
350     name: 'xtesting-{tag}-zip'
351     <<: *xtesting-params
352     container: 'xtesting'
353     jobs:
354       - 'xtesting-{tag}-zip'
355
356 - job-template:
357     name: 'xtesting-{tag}-daily'
358     project-type: multijob
359     triggers:
360       - timed: '@daily'
361     parameters:
362       - xtesting-slave:
363           slave: '{slave}'
364       - xtesting-build_tag:
365           build_tag: ''
366       - xtesting-DEBUG:
367           DEBUG: 'true'
368     properties:
369       - build-blocker:
370           use-build-blocker: true
371           blocking-level: 'NODE'
372           blocking-jobs:
373             - '^xtesting-{tag}-(daily|check|gate)$'
374     builders:
375       - multijob:
376           name: remove former images
377           projects:
378             - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
379               <<: *xtesting-jobs
380             - name: 'xtesting-opnfv-xtesting-mts-{tag}-rmi'
381               <<: *xtesting-jobs
382       - multijob:
383           name: pull containers
384           projects:
385             - name: 'xtesting-opnfv-xtesting-{tag}-pull'
386               <<: *xtesting-jobs
387             - name: 'xtesting-opnfv-xtesting-mts-{tag}-pull'
388               <<: *xtesting-jobs
389       - multijob:
390           name: opnfv/xtesting:{tag}
391           projects:
392             - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
393               <<: *xtesting-jobs
394             - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
395               <<: *xtesting-jobs
396             - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
397               <<: *xtesting-jobs
398             - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
399               <<: *xtesting-jobs
400             - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
401               <<: *xtesting-jobs
402             - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
403               <<: *xtesting-jobs
404       - multijob:
405           name: opnfv/xtesting-mts:{tag}
406           projects:
407             - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
408               <<: *xtesting-jobs
409       - multijob:
410           name: dump all campaign data
411           projects:
412             - name: 'xtesting-{tag}-zip'
413               <<: *xtesting-jobs
414
415 - job-template:
416     name: 'xtesting-{repo}-{container}-{tag}-gate'
417     parameters:
418       - xtesting-slave:
419           slave: '{slave}'
420     scm:
421       - xtesting-scm:
422           ref: $GERRIT_REFSPEC
423     builders:
424       - xtesting-build-containers:
425           <<: *xtesting-build-containers
426           ref: $GERRIT_REFSPEC
427
428 - job-template:
429     name: 'xtesting-{repo}-{container}-{tag}-check'
430     parameters:
431       - xtesting-slave:
432           slave: '{slave}'
433       - xtesting-branch:
434           branch: '{branch}'
435     scm:
436       - xtesting-scm:
437           ref: $branch
438     builders:
439       - xtesting-build-containers:
440           <<: *xtesting-build-containers
441           ref: $branch
442
443 - project:
444     name: 'xtesting-_-alpine-3.12-rmi'
445     repo: _
446     port:
447     container: alpine
448     tag: '3.12'
449     slave: master
450     jobs:
451       - 'xtesting-{repo}-{container}-{tag}-rmi'
452
453 - project:
454     name: 'xtesting-_-alpine-3.12-pull'
455     repo: _
456     port:
457     container: alpine
458     tag: '3.12'
459     slave: master
460     exclude:
461       - tag: arm64-hunter
462       - tag: arm64-iruya
463       - tag: arm64-jerma
464       - tag: arm64-kali
465       - tag: arm64-latest
466     jobs:
467       - 'xtesting-{repo}-{container}-{tag}-pull'
468
469 - project:
470     name: xtesting-opnfv-xtesting-{tag}-build
471     <<: *xtesting-params
472     container: xtesting
473     ref_arg: BRANCH
474     path: docker/core
475     exclude:
476       - tag: arm64-hunter
477       - tag: arm64-iruya
478       - tag: arm64-jerma
479       - tag: arm64-kali
480       - tag: arm64-latest
481     jobs:
482       - 'xtesting-{repo}-{container}-{tag}-gate'
483       - 'xtesting-{repo}-{container}-{tag}-check'
484
485 - project:
486     name: xtesting-opnfv-xtesting-mts-{tag}-build
487     <<: *xtesting-params
488     container: xtesting-mts
489     ref_arg: BRANCH
490     path: docker/mts
491     exclude:
492       - tag: hunter
493       - tag: iruya
494       - tag: jerma
495       - tag: kali
496       - tag: arm64-hunter
497       - tag: arm64-iruya
498       - tag: arm64-jerma
499       - tag: arm64-kali
500       - tag: arm64-latest
501     jobs:
502       - 'xtesting-{repo}-{container}-{tag}-gate'
503       - 'xtesting-{repo}-{container}-{tag}-check'
504
505 - job-template:
506     name: 'xtesting-{tag}-check'
507     project-type: multijob
508     parameters:
509       - xtesting-slave:
510           slave: '{slave}'
511       - xtesting-build_tag:
512           build_tag: ''
513       - xtesting-branch:
514           branch: '{branch}'
515       - xtesting-DEBUG:
516           DEBUG: 'true'
517     properties:
518       - build-blocker:
519           use-build-blocker: true
520           blocking-level: 'NODE'
521           blocking-jobs:
522             - '^xtesting-{tag}-(daily|check|gate)$'
523     builders:
524       - multijob:
525           name: remove former images
526           projects:
527             - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
528               <<: *xtesting-jobs
529             - name: 'xtesting-opnfv-xtesting-mts-{tag}-rmi'
530               <<: *xtesting-jobs
531       - multijob:
532           name: remove dependencies
533           projects:
534             - name: 'xtesting-_-alpine-3.12-rmi'
535               <<: *xtesting-jobs
536       - multijob:
537           name: pull dependencies
538           projects:
539             - name: 'xtesting-_-alpine-3.12-pull'
540               <<: *xtesting-jobs
541       - multijob:
542           name: opnfv/xtesting
543           projects:
544             - name: 'xtesting-opnfv-xtesting-{tag}-check'
545               <<: *xtesting-jobs
546       - multijob:
547           name: opnfv/xtesting-mts
548           projects:
549             - name: 'xtesting-opnfv-xtesting-mts-{tag}-check'
550               <<: *xtesting-jobs
551       - multijob:
552           name: opnfv/xtesting:{tag}
553           projects:
554             - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
555               <<: *xtesting-jobs
556             - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
557               <<: *xtesting-jobs
558             - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
559               <<: *xtesting-jobs
560             - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
561               <<: *xtesting-jobs
562             - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
563               <<: *xtesting-jobs
564             - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
565               <<: *xtesting-jobs
566       - multijob:
567           name: opnfv/xtesting-mts:{tag}
568           projects:
569             - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
570               <<: *xtesting-jobs
571
572 - trigger:
573     name: xtesting-patchset-created
574     triggers:
575       - gerrit:
576           server-name: 'gerrit.opnfv.org'
577           trigger-on:
578             - patchset-created-event
579             - comment-added-contains-event:
580                 comment-contains-value: 'recheck'
581             - comment-added-contains-event:
582                 comment-contains-value: 'reverify'
583           projects:
584             - project-compare-type: 'ANT'
585               project-pattern: 'functest-xtesting'
586               branches:
587                 - branch-compare-type: 'ANT'
588                   branch-pattern: '**/{branch}'
589           skip-vote:
590             successful: false
591             failed: false
592             unstable: false
593             notbuilt: false
594
595 - job-template:
596     name: 'xtesting-{tag}-gate'
597     project-type: multijob
598     triggers:
599       - xtesting-patchset-created:
600           branch: '{branch}'
601     parameters:
602       - xtesting-slave:
603           slave: '{slave}'
604       - xtesting-build_tag:
605           build_tag: ''
606       - xtesting-DEBUG:
607           DEBUG: 'true'
608     properties:
609       - build-blocker:
610           use-build-blocker: true
611           blocking-level: 'NODE'
612           blocking-jobs:
613             - '^xtesting-{tag}-(daily|check|gate)$'
614     builders:
615       - multijob:
616           name: remove former images
617           projects:
618             - name: 'xtesting-opnfv-xtesting-{tag}-rmi'
619               <<: *xtesting-jobs
620             - name: 'xtesting-opnfv-xtesting-mts-{tag}-rmi'
621               <<: *xtesting-jobs
622       - multijob:
623           name: remove dependencies
624           projects:
625             - name: 'xtesting-_-alpine-3.12-rmi'
626               <<: *xtesting-jobs
627       - multijob:
628           name: pull dependencies
629           projects:
630             - name: 'xtesting-_-alpine-3.12-pull'
631               <<: *xtesting-jobs
632       - multijob:
633           name: opnfv/xtesting
634           projects:
635             - name: 'xtesting-opnfv-xtesting-{tag}-gate'
636               <<: *xtesting-jobs
637       - multijob:
638           name: opnfv/xtesting-mts
639           projects:
640             - name: 'xtesting-opnfv-xtesting-mts-{tag}-gate'
641               <<: *xtesting-jobs
642       - multijob:
643           name: opnfv/xtesting:{tag}
644           projects:
645             - name: 'xtesting-opnfv-xtesting-{tag}-first-run'
646               <<: *xtesting-jobs
647             - name: 'xtesting-opnfv-xtesting-{tag}-second-run'
648               <<: *xtesting-jobs
649             - name: 'xtesting-opnfv-xtesting-{tag}-third-run'
650               <<: *xtesting-jobs
651             - name: 'xtesting-opnfv-xtesting-{tag}-fourth-run'
652               <<: *xtesting-jobs
653             - name: 'xtesting-opnfv-xtesting-{tag}-fifth-run'
654               <<: *xtesting-jobs
655             - name: 'xtesting-opnfv-xtesting-{tag}-sixth-run'
656               <<: *xtesting-jobs
657       - multijob:
658           name: opnfv/xtesting-mts:{tag}
659           projects:
660             - name: 'xtesting-opnfv-xtesting-mts-{tag}-seventh-run'
661               <<: *xtesting-jobs
662
663 - project:
664     name: 'xtesting'
665     <<: *xtesting-params
666     jobs:
667       - 'xtesting-{tag}-daily'
668
669 - project:
670     name: 'xtesting-gate'
671     <<: *xtesting-params
672     exclude:
673       - tag: arm64-hunter
674       - tag: arm64-iruya
675       - tag: arm64-jerma
676       - tag: arm64-kali
677       - tag: arm64-latest
678     jobs:
679       - 'xtesting-{tag}-check'
680       - 'xtesting-{tag}-gate'
681
682 - view:
683     name: xtesting
684     view-type: list
685     columns:
686       - status
687       - weather
688       - job
689       - last-success
690       - last-failure
691       - last-duration
692     regex: ^xtesting-(arm.*-|amd64-)*[a-z]+-daily$
693
694 - view:
695     name: xtesting-gate
696     view-type: list
697     columns:
698       - status
699       - weather
700       - job
701       - last-success
702       - last-failure
703       - last-duration
704     regex: ^xtesting-(arm.*-|amd64-)*[a-z]+-gate$