Add docker image tag for euphrates
[releng.git] / jjb / releng / opnfv-docker.yml
1 ##############################################
2 # job configuration for docker build and push
3 ##############################################
4
5 - project:
6
7     name: opnfv-docker
8
9     master: &master
10         stream: master
11         branch: '{stream}'
12         disabled: false
13     danube: &danube
14         stream: danube
15         branch: 'stable/{stream}'
16         disabled: false
17     euphrates: &euphrates
18         stream: euphrates
19         branch: 'stable/{stream}'
20         disabled: false
21     functest-receivers: &functest-receivers
22         receivers: >
23             jalausuch@suse.com morgan.richomme@orange.com
24             cedric.ollivier@orange.com feng.xiaowei@zte.com.cn
25             juha.kosonen@nokia.com wangwulin@huawei.com
26     storperf-receivers: &storperf-receivers
27         receivers: >
28             mark.beierl@emc.com
29     other-receivers: &other-receivers
30         receivers: ''
31
32     dockerfile: "Dockerfile"
33     dockerdir: "docker"
34     arch_tag: ""
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     dockerrepo:
40         # projects with jobs for master
41         - 'releng-anteater':
42             project: 'releng-anteater'
43             <<: *master
44             <<: *other-receivers
45         - 'bottlenecks':
46             project: 'bottlenecks'
47             <<: *master
48             <<: *other-receivers
49         - 'cperf':
50             project: 'cperf'
51             <<: *master
52             <<: *other-receivers
53         - 'dovetail':
54             project: 'dovetail'
55             <<: *master
56             <<: *other-receivers
57         - 'functest':
58             project: 'functest'
59             <<: *master
60             <<: *functest-receivers
61         - 'nfvbench':
62             project: 'nfvbench'
63             <<: *master
64             <<: *other-receivers
65         - 'qtip':
66             project: 'qtip'
67             <<: *master
68             <<: *other-receivers
69         - 'storperf-master':
70             project: 'storperf'
71             dockerdir: 'docker/storperf-master'
72             arch_tag: 'x86_64'
73             <<: *master
74             <<: *storperf-receivers
75         - 'storperf-graphite':
76             project: 'storperf'
77             dockerdir: 'docker/storperf-graphite'
78             arch_tag: 'x86_64'
79             <<: *master
80             <<: *storperf-receivers
81         - 'storperf-httpfrontend':
82             project: 'storperf'
83             dockerdir: 'docker/storperf-httpfrontend'
84             arch_tag: 'x86_64'
85             <<: *master
86             <<: *storperf-receivers
87         - 'storperf-reporting':
88             project: 'storperf'
89             dockerdir: 'docker/storperf-reporting'
90             arch_tag: 'x86_64'
91             <<: *master
92             <<: *storperf-receivers
93         - 'storperf-swaggerui':
94             project: 'storperf'
95             dockerdir: 'docker/storperf-swaggerui'
96             arch_tag: 'x86_64'
97             <<: *master
98             <<: *storperf-receivers
99         - 'yardstick':
100             project: 'yardstick'
101             <<: *master
102             <<: *other-receivers
103         # projects with jobs for Danube
104         - 'bottlenecks':
105             project: 'bottlenecks'
106             <<: *danube
107             <<: *other-receivers
108         - 'qtip':
109             project: 'qtip'
110             <<: *euphrates
111             <<: *other-receivers
112         - 'yardstick':
113             project: 'yardstick'
114             <<: *danube
115             <<: *other-receivers
116         # projects with jobs for euphrates
117         - 'functest':
118             project: 'functest'
119             <<: *euphrates
120             <<: *functest-receivers
121         - 'functest-core':
122             project: 'functest'
123             dockerdir: 'docker/core'
124             <<: *euphrates
125             <<: *functest-receivers
126         - 'functest-healthcheck':
127             project: 'functest'
128             dockerdir: 'docker/healthcheck'
129             <<: *euphrates
130             <<: *functest-receivers
131         - 'functest-smoke':
132             project: 'functest'
133             dockerdir: 'docker/smoke'
134             <<: *euphrates
135             <<: *functest-receivers
136         - 'functest-features':
137             project: 'functest'
138             dockerdir: 'docker/features'
139             <<: *euphrates
140             <<: *functest-receivers
141         - 'functest-components':
142             project: 'functest'
143             dockerdir: 'docker/components'
144             <<: *euphrates
145             <<: *functest-receivers
146         - 'functest-vnf':
147             project: 'functest'
148             dockerdir: 'docker/vnf'
149             <<: *euphrates
150             <<: *functest-receivers
151         - 'functest-parser':
152             project: 'functest'
153             dockerdir: 'docker/parser'
154             <<: *euphrates
155             <<: *functest-receivers
156         - 'functest-restapi':
157             project: 'functest'
158             dockerdir: 'docker/restapi'
159             <<: *euphrates
160             <<: *functest-receivers
161         - 'storperf-master':
162             project: 'storperf'
163             dockerdir: 'docker/storperf-master'
164             arch_tag: 'x86_64'
165             <<: *euphrates
166             <<: *storperf-receivers
167         - 'storperf-graphite':
168             project: 'storperf'
169             dockerdir: 'docker/storperf-graphite'
170             arch_tag: 'x86_64'
171             <<: *euphrates
172             <<: *storperf-receivers
173         - 'storperf-httpfrontend':
174             project: 'storperf'
175             dockerdir: 'docker/storperf-httpfrontend'
176             arch_tag: 'x86_64'
177             <<: *euphrates
178             <<: *storperf-receivers
179         - 'storperf-reporting':
180             project: 'storperf'
181             dockerdir: 'docker/storperf-reporting'
182             arch_tag: 'x86_64'
183             <<: *euphrates
184             <<: *storperf-receivers
185         - 'storperf-swaggerui':
186             project: 'storperf'
187             dockerdir: 'docker/storperf-swaggerui'
188             arch_tag: 'x86_64'
189             <<: *euphrates
190             <<: *storperf-receivers
191         - 'nfvbench':
192             project: 'nfvbench'
193             <<: *euphrates
194             <<: *other-receivers
195
196     jobs:
197         - "{dockerrepo}-docker-build-push-{stream}"
198
199
200 - project:
201
202     name: opnfv-monitor-docker        # projects which only monitor dedicated file or path
203
204     dockerfile: "Dockerfile"
205     dockerdir: "docker"
206     arch_tag: ""
207
208     project:
209         # projects with jobs for master
210         - 'daisy':
211             dockerrepo: 'daisy'
212             <<: *master
213         - 'escalator':
214             dockerrepo: 'escalator'
215             <<: *master
216
217     jobs:
218         - '{project}-docker-build-push-monitor-{stream}'
219
220 ########################
221 # job templates
222 ########################
223 - job-template:
224     name: '{dockerrepo}-docker-build-push-{stream}'
225
226     disabled: '{obj:disabled}'
227
228     parameters: &parameters
229         - project-parameter:
230             project: '{project}'
231             branch: '{branch}'
232         - 'opnfv-build-ubuntu-defaults'
233         - string:
234             name: PUSH_IMAGE
235             default: "true"
236             description: "To enable/disable pushing the image to Dockerhub."
237         - string:
238             name: DOCKER_REPO_NAME
239             default: "opnfv/{dockerrepo}"
240             description: "Dockerhub repo to be pushed to."
241         - string:
242             name: DOCKER_DIR
243             default: "{dockerdir}"
244             description: "Directory containing files needed by the Dockerfile"
245         - string:
246             name: COMMIT_ID
247             default: ""
248             description: "commit id to make a snapshot docker image"
249         - string:
250             name: RELEASE_VERSION
251             default: ""
252             description: "Release version, e.g. 1.0, 2.0, 3.0"
253         - string:
254             name: DOCKERFILE
255             default: "{dockerfile}"
256             description: "Dockerfile to use for creating the image."
257         - string:
258             name: ARCH_TAG
259             default: "{arch_tag}"
260             description: "If set, this value will be added to the docker image tag as a prefix"
261
262     properties:
263         - throttle:
264             max-per-node: 1
265             option: 'project'
266
267     scm:
268         - git-scm
269
270     builders: &builders
271         - shell:
272             !include-raw-escape: ./opnfv-docker.sh
273
274     triggers:
275         - pollscm:
276             cron: "*/30 * * * *"
277
278     publishers:
279         - email:
280             recipients: '{receivers}'
281         - email-jenkins-admins-on-failure
282
283 - job-template:
284     name: '{project}-docker-build-push-monitor-{stream}'
285     disabled: '{obj:disabled}'
286     parameters: *parameters
287     scm:
288         - git-scm
289     builders: *builders
290
291     # trigger only matching the file name
292     triggers:
293         - gerrit:
294             trigger-on:
295                 - change-merged-event
296                 - comment-added-contains-event:
297                     comment-contains-value: 'remerge'
298             projects:
299               - project-compare-type: 'ANT'
300                 project-pattern: '{project}'
301                 branches:
302                     - branch-compare-type: 'ANT'
303                       branch-pattern: '**/{branch}'
304                 file-paths:
305                   - compare-type: ANT
306                     pattern: 'docker/**'
307