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