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