Close Functest and Xtesting Hunter and Iruya jjbs
[releng.git] / jjb / functest / xtesting-pi.yaml
1 ---
2 - xtesting-pi-containers: &xtesting-pi-containers
3     name: 'xtesting-pi-containers'
4     repo: '{repo}'
5     port: '{port}'
6     container: '{container}'
7     tag: '{tag}'
8
9 - xtesting-pi-params: &xtesting-pi-params
10     name: 'xtesting-pi-params'
11     repo: 'ollivier'
12     port:
13     tag:
14       - latest:
15           slave: lf-virtual1
16       - wallaby:
17           slave: lf-virtual1
18       - leguer:
19           slave: lf-virtual1
20       - kali:
21           slave: lf-virtual1
22       - jerma:
23           slave: lf-virtual1
24       - arm-latest:
25           slave: lf-virtual1
26       - arm-wallaby:
27           slave: lf-virtual1
28       - arm-leguer:
29           slave: lf-virtual1
30       - arm-kali:
31           slave: lf-virtual1
32       - arm-jerma:
33           slave: lf-virtual1
34       - arm64-latest:
35           slave: lf-virtual1
36       - arm64-wallaby:
37           slave: lf-virtual1
38       - arm64-leguer:
39           slave: lf-virtual1
40       - arm64-kali:
41           slave: lf-virtual1
42       - arm64-jerma:
43           slave: lf-virtual1
44
45 - xtesting-pi-jobs: &xtesting-pi-jobs
46     name: 'xtesting-pi-jobs'
47     current-parameters: true
48
49 - parameter:
50     name: xtesting-pi-slave
51     parameters:
52       - label:
53           name: slave
54           default: '{slave}'
55
56 - parameter:
57     name: xtesting-pi-build_tag
58     parameters:
59       - random-string:
60           name: build_tag
61
62
63 - xtesting-pi-run-containers: &xtesting-pi-run-containers
64     name: 'xtesting-pi-run-containers'
65     <<: *xtesting-pi-containers
66     test: '{test}'
67     privileged: '{privileged}'
68     network: '{network}'
69
70 - builder:
71     name: xtesting-pi-pull-containers
72     builders:
73       - shell: |
74           set +x
75           if [ "{repo}" = "_" ]; then
76             image={container}:{tag}
77           elif [ "{port}" = "None" ]; then
78             image={repo}/{container}:{tag}
79           else
80             image={repo}:{port}/{container}:{tag}
81           fi
82           sudo docker pull $image
83
84 - builder:
85     name: xtesting-pi-run-containers
86     builders:
87       - shell: |
88           set +x
89           [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
90           if [ "{repo}" = "_" ]; then
91             image={container}:{tag}
92           elif [ "{port}" = "None" ]; then
93             image={repo}/{container}:{tag}
94           else
95             image={repo}:{port}/{container}:{tag}
96           fi
97           sudo docker run --rm \
98             --privileged={privileged} \
99             --network={network} \
100             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
101             -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
102             -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting/$BUILD_TAG/$JOB_NAME-$BUILD_ID \
103             -v /home/opnfv/xtesting/.boto:/root/.boto \
104             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
105             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
106             -e NODE_NAME=$slave \
107             -e BUILD_TAG=$BUILD_TAG \
108             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
109             $image run_tests -t {test} -p -r
110
111 - builder:
112     name: xtesting-pi-remove-images
113     builders:
114       - shell: |
115           set +x
116           if [ "{repo}" = "_" ]; then
117             image={container}:{tag}
118           elif [ "{port}" = "None" ]; then
119             image={repo}/{container}:{tag}
120           else
121             image={repo}:{port}/{container}:{tag}
122           fi
123           sudo docker rmi $image || true
124
125 - job-template:
126     name: 'xtesting-pi-{repo}-{container}-{tag}-pull'
127     parameters:
128       - xtesting-pi-slave:
129           slave: '{slave}'
130     builders:
131       - xtesting-pi-pull-containers:
132           <<: *xtesting-pi-containers
133
134 - project:
135     name: 'xtesting-pi-ollivier-xtesting-pull'
136     <<: *xtesting-pi-params
137     container: 'xtesting'
138     jobs:
139       - 'xtesting-pi-{repo}-{container}-{tag}-pull'
140
141 - project:
142     name: 'xtesting-pi-ollivier-xtesting-mts-pull'
143     <<: *xtesting-pi-params
144     container: 'xtesting-mts'
145     jobs:
146       - 'xtesting-pi-{repo}-{container}-{tag}-pull'
147
148 - job-template:
149     name: 'xtesting-pi-{repo}-{container}-{tag}-rmi'
150     parameters:
151       - xtesting-pi-slave:
152           slave: '{slave}'
153     builders:
154       - xtesting-pi-remove-images:
155           <<: *xtesting-pi-containers
156
157 - project:
158     name: 'xtesting-pi-ollivier-xtesting-rmi'
159     <<: *xtesting-pi-params
160     container: 'xtesting'
161     jobs:
162       - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
163
164 - project:
165     name: 'xtesting-pi-ollivier-xtesting-mts-rmi'
166     <<: *xtesting-pi-params
167     container: 'xtesting-mts'
168     jobs:
169       - 'xtesting-pi-{repo}-{container}-{tag}-rmi'
170
171 - job-template:
172     name: 'xtesting-pi-{repo}-{container}-{tag}-{test}-run'
173     parameters:
174       - xtesting-pi-slave:
175           slave: '{slave}'
176       - xtesting-pi-build_tag:
177           build_tag: ''
178     builders:
179       - xtesting-pi-run-containers:
180           <<: *xtesting-pi-run-containers
181
182 - project:
183     name: 'xtesting-pi-ollivier-xtesting'
184     <<: *xtesting-pi-params
185     container: 'xtesting'
186     test:
187       - first
188       - second
189       - third
190       - fourth
191       - fifth
192       - sixth
193       - eighth
194     privileged: 'false'
195     network: bridge
196     exclude:
197       - {'tag': 'leguer', 'test': 'eighth'}
198       - {'tag': 'kali', 'test': 'eighth'}
199       - {'tag': 'jerma', 'test': 'eighth'}
200       - {'tag': 'arm-leguer', 'test': 'eighth'}
201       - {'tag': 'arm-kali', 'test': 'eighth'}
202       - {'tag': 'arm-jerma', 'test': 'eighth'}
203       - {'tag': 'arm64-leguer', 'test': 'eighth'}
204       - {'tag': 'arm64-kali', 'test': 'eighth'}
205       - {'tag': 'arm64-jerma', 'test': 'eighth'}
206     jobs:
207       - 'xtesting-pi-{repo}-{container}-{tag}-{test}-run'
208
209 - project:
210     name: 'xtesting-pi-ollivier-xtesting-mts'
211     <<: *xtesting-pi-params
212     container: 'xtesting-mts'
213     test:
214       - seventh
215     privileged: 'false'
216     network: bridge
217     jobs:
218       - 'xtesting-pi-{repo}-{container}-{tag}-{test}-run'
219
220
221 - builder:
222     name: xtesting-pi-zip
223     builders:
224       - shell: |
225           set +x
226           [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true
227           if [ "{repo}" = "_" ]; then
228             image={container}:{tag}
229           elif [ "{port}" = "None" ]; then
230             image={repo}/{container}:{tag}
231           else
232             image={repo}:{port}/{container}:{tag}
233           fi
234           sudo docker run --rm \
235             -e S3_ENDPOINT_URL=https://storage.googleapis.com \
236             -e S3_DST_URL=s3://artifacts.opnfv.org/xtesting \
237             -e HTTP_DST_URL=http://artifacts.opnfv.org/xtesting \
238             -v /home/opnfv/xtesting/.boto:/root/.boto \
239             -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \
240             -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \
241             -e BUILD_TAG=$BUILD_TAG \
242             -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \
243             $image zip_campaign
244
245 - job-template:
246     name: 'xtesting-pi-{tag}-zip'
247     parameters:
248       - xtesting-pi-slave:
249           slave: '{slave}'
250       - xtesting-pi-build_tag:
251           build_tag: ''
252     builders:
253       - xtesting-pi-zip:
254           <<: *xtesting-pi-containers
255
256 - project:
257     name: 'xtesting-pi-{tag}-zip'
258     <<: *xtesting-pi-params
259     container: 'xtesting'
260     jobs:
261       - 'xtesting-pi-{tag}-zip'
262
263 - job-template:
264     name: 'xtesting-pi-{tag}-daily'
265     project-type: multijob
266     triggers:
267       - timed: '@daily'
268     parameters:
269       - xtesting-pi-slave:
270           slave: '{slave}'
271       - xtesting-pi-build_tag:
272           build_tag: ''
273     properties:
274       - build-blocker:
275           use-build-blocker: true
276           blocking-level: 'NODE'
277           blocking-jobs:
278             - '^xtesting-pi-{tag}-(daily|docker|review)$'
279     builders:
280       - multijob:
281           name: remove former images
282           projects:
283             - name: 'xtesting-pi-ollivier-xtesting-{tag}-rmi'
284               <<: *xtesting-pi-jobs
285             - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-rmi'
286               <<: *xtesting-pi-jobs
287       - multijob:
288           name: pull containers
289           projects:
290             - name: 'xtesting-pi-ollivier-xtesting-{tag}-pull'
291               <<: *xtesting-pi-jobs
292             - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-pull'
293               <<: *xtesting-pi-jobs
294       - multijob:
295           name: ollivier/xtesting:{tag}
296           projects:
297             - name: 'xtesting-pi-ollivier-xtesting-{tag}-first-run'
298               <<: *xtesting-pi-jobs
299             - name: 'xtesting-pi-ollivier-xtesting-{tag}-second-run'
300               <<: *xtesting-pi-jobs
301             - name: 'xtesting-pi-ollivier-xtesting-{tag}-third-run'
302               <<: *xtesting-pi-jobs
303             - name: 'xtesting-pi-ollivier-xtesting-{tag}-fourth-run'
304               <<: *xtesting-pi-jobs
305             - name: 'xtesting-pi-ollivier-xtesting-{tag}-fifth-run'
306               <<: *xtesting-pi-jobs
307             - name: 'xtesting-pi-ollivier-xtesting-{tag}-sixth-run'
308               <<: *xtesting-pi-jobs
309             - name: 'xtesting-pi-ollivier-xtesting-{tag}-eighth-run'
310               <<: *xtesting-pi-jobs
311       - multijob:
312           name: ollivier/xtesting-mts:{tag}
313           projects:
314             - name: 'xtesting-pi-ollivier-xtesting-mts-{tag}-seventh-run'
315               <<: *xtesting-pi-jobs
316       - multijob:
317           name: dump all campaign data
318           projects:
319             - name: 'xtesting-pi-{tag}-zip'
320               <<: *xtesting-pi-jobs
321
322 - project:
323     name: 'xtesting-pi-daily'
324     <<: *xtesting-pi-params
325     jobs:
326       - 'xtesting-pi-{tag}-daily'
327
328 - view:
329     name: xtesting-pi
330     view-type: list
331     columns:
332       - status
333       - weather
334       - job
335       - last-success
336       - last-failure
337       - last-duration
338     regex: ^xtesting-pi-[a-z-0-9.]+-daily$