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