ac1c5741c0c5b962886da380abc305e1ecc98f84
[releng.git] / jjb / releng / opnfv-docker.yaml
1 ---
2 ##############################################
3 # job configuration for docker build and push
4 ##############################################
5
6 - project:
7
8     name: opnfv-docker
9
10     master: &master
11       stream: master
12       branch: '{stream}'
13       disabled: false
14     hunter: &hunter
15       stream: hunter
16       branch: 'stable/{stream}'
17       disabled: false
18     iruya: &iruya
19       stream: iruya
20       branch: 'stable/{stream}'
21       disabled: false
22     laas-receivers: &laas_receivers
23       receivers: >
24           pberberian@iol.unh.edu
25           sbergeron@iol.unh.edu
26     storperf-receivers: &storperf-receivers
27       receivers: >
28           mbeierl@vmware.com
29     other-receivers: &other-receivers
30       receivers: ''
31
32     dockerfile: "Dockerfile"
33     dockerdir: "docker"
34     arch_tag: ""
35     extra_build_args: ""
36
37     # This is the dockerhub repo the image will be pushed to as
38     # 'opnfv/{dockerrepo}. See: DOCKER_REPO_NAME parameter.
39     # 'project' is the OPNFV repo we expect to contain the Dockerfile
40     # yamllint disable rule:key-duplicates
41     dockerrepo:
42       # projects with jobs for master
43       - 'releng-anteater':
44           project: 'releng-anteater'
45           <<: *master
46           <<: *other-receivers
47       - 'barometer-collectd':
48           project: 'barometer'
49           dockerdir: 'docker/barometer-collectd'
50           <<: *master
51           <<: *other-receivers
52       - 'barometer-collectd-experimental':
53           project: 'barometer'
54           dockerdir: '.'
55           dockerfile: 'docker/barometer-collectd-experimental/Dockerfile'
56           <<: *master
57           <<: *other-receivers
58       - 'barometer-collectd-latest':
59           project: 'barometer'
60           dockerdir: '.'
61           dockerfile: 'docker/barometer-collectd-latest/Dockerfile'
62           <<: *master
63           <<: *other-receivers
64       - 'barometer-dma':
65           project: 'barometer'
66           dockerdir: 'docker/barometer-dma'
67           <<: *master
68           <<: *other-receivers
69       - 'barometer-grafana':
70           project: 'barometer'
71           dockerdir: 'docker/barometer-grafana'
72           <<: *master
73           <<: *other-receivers
74       - 'barometer-influxdb':
75           project: 'barometer'
76           dockerdir: 'docker/barometer-influxdb'
77           <<: *master
78           <<: *other-receivers
79       - 'barometer-kafka':
80           project: 'barometer'
81           dockerdir: 'docker/barometer-kafka'
82           <<: *master
83           <<: *other-receivers
84       - 'barometer-ves':
85           project: 'barometer'
86           dockerdir: 'docker/barometer-ves'
87           <<: *master
88           <<: *other-receivers
89       - 'barometer-snmp':
90           project: 'barometer'
91           dockerdir: 'docker/barometer-snmp'
92           <<: *master
93           <<: *other-receivers
94       - 'clover':
95           project: 'clover'
96           dockerdir: '.'
97           dockerfile: 'docker/Dockerfile'
98           <<: *master
99           <<: *other-receivers
100       - 'clover-ns-nginx-lb':
101           project: 'clover'
102           dockerdir: 'samples/services/nginx/docker'
103           dockerfile: 'subservices/lb/Dockerfile'
104           <<: *master
105           <<: *other-receivers
106       - 'clover-ns-nginx-proxy':
107           project: 'clover'
108           dockerdir: 'samples/services/nginx/docker'
109           dockerfile: 'subservices/proxy/Dockerfile'
110           <<: *master
111           <<: *other-receivers
112       - 'clover-ns-nginx-server':
113           project: 'clover'
114           dockerdir: 'samples/services/nginx/docker'
115           dockerfile: 'subservices/server/Dockerfile'
116           <<: *master
117           <<: *other-receivers
118       - 'clover-ns-snort-ids':
119           project: 'clover'
120           dockerdir: 'samples/services/snort_ids/docker'
121           dockerfile: 'Dockerfile'
122           <<: *master
123           <<: *other-receivers
124       - 'clover-controller':
125           project: 'clover'
126           dockerdir: 'clover/controller'
127           dockerfile: 'docker/Dockerfile'
128           <<: *master
129           <<: *other-receivers
130       - 'clover-collector':
131           project: 'clover'
132           dockerdir: 'clover/collector'
133           dockerfile: 'docker/Dockerfile'
134           <<: *master
135           <<: *other-receivers
136       - 'clover-jmeter-master':
137           project: 'clover'
138           dockerdir: 'clover/tools/jmeter'
139           dockerfile: 'jmeter-master/Dockerfile'
140           <<: *master
141           <<: *other-receivers
142       - 'clover-jmeter-slave':
143           project: 'clover'
144           dockerdir: 'clover/tools/jmeter'
145           dockerfile: 'jmeter-slave/Dockerfile'
146           <<: *master
147           <<: *other-receivers
148       - 'clover-sample-app':
149           project: 'clover'
150           dockerdir: 'samples/scenarios/sample_app'
151           dockerfile: 'Dockerfile'
152           <<: *master
153           <<: *other-receivers
154       - 'clover-ns-modsecurity-crs':
155           project: 'clover'
156           dockerdir: 'samples/services/modsecurity/docker'
157           dockerfile: 'Dockerfile'
158           <<: *master
159           <<: *other-receivers
160       - 'clover-spark':
161           project: 'clover'
162           dockerdir: 'clover/spark/docker/clover-spark'
163           dockerfile: 'Dockerfile'
164           <<: *master
165           <<: *other-receivers
166       - 'clover-spark-submit':
167           project: 'clover'
168           dockerdir: 'clover/spark/docker/spark-submit'
169           dockerfile: 'Dockerfile'
170           <<: *master
171           <<: *other-receivers
172       - 'clover-clovisor':
173           project: 'clover'
174           dockerdir: 'clover/clovisor'
175           dockerfile: 'Dockerfile'
176           <<: *master
177           <<: *other-receivers
178       - 'dovetail':
179           project: 'dovetail'
180           <<: *master
181           <<: *other-receivers
182       - 'dovetail-webportal-api':
183           project: 'dovetail-webportal'
184           dockerfile: 'Dockerfile.api'
185           <<: *master
186           <<: *other-receivers
187       - 'dovetail-webportal-web':
188           project: 'dovetail-webportal'
189           dockerfile: 'Dockerfile.web'
190           <<: *master
191           <<: *other-receivers
192       - 'dovetail-webportal-web-onap':
193           project: 'dovetail-webportal'
194           dockerfile: 'Dockerfile.web'
195           extra_build_args: 'CONTAINER=onap GUI=onap-ui'
196           <<: *master
197           <<: *other-receivers
198       - 'nfvbench':
199           project: 'nfvbench'
200           <<: *master
201           <<: *other-receivers
202       - 'laas-dashboard':
203           project: 'laas'
204           dockerdir: '.'
205           dockerfile: 'web/Dockerfile'
206           <<: *master
207           <<: *laas_receivers
208       - 'laas-celery':
209           project: 'laas'
210           dockerdir: '.'
211           dockerfile: 'worker/Dockerfile'
212           <<: *master
213           <<: *laas_receivers
214       - 'storperf-master':
215           project: 'storperf'
216           dockerdir: 'docker/storperf-master'
217           arch_tag: 'x86_64'
218           <<: *master
219           <<: *storperf-receivers
220       - 'storperf-graphite':
221           project: 'storperf'
222           dockerdir: 'docker/storperf-graphite'
223           arch_tag: 'x86_64'
224           <<: *master
225           <<: *storperf-receivers
226       - 'storperf-httpfrontend':
227           project: 'storperf'
228           dockerdir: 'docker/storperf-httpfrontend'
229           arch_tag: 'x86_64'
230           <<: *master
231           <<: *storperf-receivers
232       - 'storperf-reporting':
233           project: 'storperf'
234           dockerdir: 'docker/storperf-reporting'
235           arch_tag: 'x86_64'
236           <<: *master
237           <<: *storperf-receivers
238       - 'storperf-swaggerui':
239           project: 'storperf'
240           dockerdir: 'docker/storperf-swaggerui'
241           arch_tag: 'x86_64'
242           <<: *master
243           <<: *storperf-receivers
244       - 'storperf-workloadagent':
245           project: 'storperf'
246           dockerdir: 'docker/storperf-workloadagent'
247           arch_tag: 'x86_64'
248           <<: *master
249           <<: *storperf-receivers
250
251       # projects with jobs for hunter
252       - 'dovetail':
253           project: 'dovetail'
254           <<: *hunter
255           <<: *other-receivers
256
257       # projects with jobs for iruya
258       - 'barometer-dma':
259           project: 'barometer'
260           dockerdir: 'docker/barometer-dma'
261           <<: *iruya
262           <<: *other-receivers
263       - 'barometer-collectd':
264           project: 'barometer'
265           dockerdir: 'docker/barometer-collectd'
266           <<: *iruya
267           <<: *other-receivers
268       - 'barometer-collectd-experimental':
269           project: 'barometer'
270           dockerdir: '.'
271           dockerfile: 'docker/barometer-collectd-experimental/Dockerfile'
272           <<: *iruya
273           <<: *other-receivers
274       - 'barometer-collectd-master':
275           project: 'barometer'
276           dockerdir: '.'
277           dockerfile: 'docker/barometer-collectd-master/Dockerfile'
278           <<: *iruya
279           <<: *other-receivers
280       - 'barometer-grafana':
281           project: 'barometer'
282           dockerdir: 'docker/barometer-grafana'
283           <<: *iruya
284           <<: *other-receivers
285       - 'barometer-influxdb':
286           project: 'barometer'
287           dockerdir: 'docker/barometer-influxdb'
288           <<: *iruya
289           <<: *other-receivers
290       - 'barometer-kafka':
291           project: 'barometer'
292           dockerdir: 'docker/barometer-kafka'
293           <<: *iruya
294           <<: *other-receivers
295       - 'barometer-ves':
296           project: 'barometer'
297           dockerdir: 'docker/barometer-ves'
298           <<: *iruya
299           <<: *other-receivers
300       - 'barometer-snmp':
301           project: 'barometer'
302           dockerdir: 'docker/barometer-snmp'
303           <<: *iruya
304           <<: *other-receivers
305       - 'storperf-master':
306           project: 'storperf'
307           dockerdir: 'docker/storperf-master'
308           arch_tag: 'x86_64'
309           <<: *iruya
310           <<: *storperf-receivers
311       - 'storperf-graphite':
312           project: 'storperf'
313           dockerdir: 'docker/storperf-graphite'
314           arch_tag: 'x86_64'
315           <<: *iruya
316           <<: *storperf-receivers
317       - 'storperf-httpfrontend':
318           project: 'storperf'
319           dockerdir: 'docker/storperf-httpfrontend'
320           arch_tag: 'x86_64'
321           <<: *iruya
322           <<: *storperf-receivers
323       - 'storperf-reporting':
324           project: 'storperf'
325           dockerdir: 'docker/storperf-reporting'
326           arch_tag: 'x86_64'
327           <<: *iruya
328           <<: *storperf-receivers
329       - 'storperf-swaggerui':
330           project: 'storperf'
331           dockerdir: 'docker/storperf-swaggerui'
332           arch_tag: 'x86_64'
333           <<: *iruya
334           <<: *storperf-receivers
335       - 'storperf-workloadagent':
336           project: 'storperf'
337           dockerdir: 'docker/storperf-workloadagent'
338           arch_tag: 'x86_64'
339           <<: *iruya
340           <<: *storperf-receivers
341
342     # yamllint enable rule:key-duplicates
343     jobs:
344       - "{dockerrepo}-docker-build-push-{stream}"
345
346 ########################
347 # job templates
348 ########################
349 - job-template:
350     name: '{dockerrepo}-docker-build-push-{stream}'
351
352     disabled: '{obj:disabled}'
353
354     parameters: &parameters
355       - project-parameter:
356           project: '{project}'
357           branch: '{branch}'
358       - 'opnfv-build-ubuntu-defaults'
359       - string:
360           name: PUSH_IMAGE
361           default: "true"
362           description: "To enable/disable pushing the image to Dockerhub."
363       - string:
364           name: DOCKER_REPO_NAME
365           default: "opnfv/{dockerrepo}"
366           description: "Dockerhub repo to be pushed to."
367       - string:
368           name: DOCKER_DIR
369           default: "{dockerdir}"
370           description: "Directory containing files needed by the Dockerfile"
371       - string:
372           name: COMMIT_ID
373           default: ""
374           description: "commit id to make a snapshot docker image"
375       - string:
376           name: GERRIT_REFNAME
377           default: ""
378           description: "Docker tag to be built, e.g. refs/tags/5.0.0, refs/tags/opnfv-5.0.0, refs/tags/5.0.RC1"
379       - string:
380           name: DOCKERFILE
381           default: "{dockerfile}"
382           description: "Dockerfile to use for creating the image."
383       - string:
384           name: ARCH_TAG
385           default: "{arch_tag}"
386           description: "If set, this value will be added to the docker image tag as a prefix"
387       - string:
388           name: EXTRA_BUILD_ARGS
389           default: "{extra_build_args}"
390           description: "Whitespace separated key=value pairs. If set, these args will be used to build docker image"
391
392     properties:
393       - throttle:
394           max-per-node: 1
395           option: 'project'
396
397     scm:
398       - git-scm
399
400     builders: &builders
401       - shell:
402           !include-raw-escape: ./opnfv-docker.sh
403
404     triggers:
405       - pollscm:
406           cron: "*/30 * * * *"
407       - gerrit-trigger-tag-created:
408           project: '{project}'
409
410     publishers:
411       - email:
412           recipients: '{receivers}'
413       - email-jenkins-admins-on-failure