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