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