fa9c441e846e67a1781ac099ded95b060eb1375f
[releng.git] / 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     functest-receivers: &functest-receivers
18         receivers: >
19             jose.lausuch@ericsson.com morgan.richomme@orange.com
20             cedric.ollivier@orange.com feng.xiaowei@zte.com.cn
21             yaohelan@huawei.com helanyao@gmail.com
22             juha.kosonen@nokia.com
23     other-receivers: &other-receivers
24         receivers: ''
25
26     dockerfile: "Dockerfile"
27     dockerdir: "docker"
28
29     # This is the dockerhub repo the image will be pushed to as
30     # 'opnfv/{dockerrepo}. See: DOCKER_REPO_NAME parameter.
31     # 'project' is the OPNFV repo we expect to contain the Dockerfile
32     dockerrepo:
33         # projects with jobs for master
34         - 'releng-anteater':
35             project: 'releng-anteater'
36             <<: *master
37             <<: *other-receivers
38         - 'bottlenecks':
39             project: 'bottlenecks'
40             <<: *master
41             <<: *other-receivers
42         - 'cperf':
43             project: 'cperf'
44             <<: *master
45             <<: *other-receivers
46         - 'dovetail':
47             project: 'dovetail'
48             <<: *master
49             <<: *other-receivers
50         - 'functest':
51             project: 'functest'
52             <<: *master
53             <<: *functest-receivers
54         - 'qtip':
55             project: 'qtip'
56             <<: *master
57             <<: *other-receivers
58         - 'storperf-master':
59             project: 'storperf'
60             dockerdir: 'docker/storperf-master'
61             <<: *master
62             <<: *other-receivers
63         - 'storperf-httpfrontend':
64             project: 'storperf'
65             dockerdir: 'docker/storperf-httpfrontend'
66             <<: *master
67             <<: *other-receivers
68         - 'storperf-reporting':
69             project: 'storperf'
70             dockerdir: 'docker/storperf-reporting'
71             <<: *master
72             <<: *other-receivers
73         - 'yardstick':
74             project: 'yardstick'
75             <<: *master
76             <<: *other-receivers
77         # projects with jobs for stable
78         - 'bottlenecks':
79             project: 'bottlenecks'
80             <<: *danube
81             <<: *other-receivers
82         - 'functest':
83             project: 'functest'
84             <<: *danube
85             <<: *functest-receivers
86         - 'qtip':
87             project: 'qtip'
88             <<: *danube
89             <<: *other-receivers
90         - 'storperf':
91             project: 'storperf'
92             <<: *danube
93             <<: *other-receivers
94         - 'yardstick':
95             project: 'yardstick'
96             <<: *danube
97             <<: *other-receivers
98
99     jobs:
100         - "{dockerrepo}-docker-build-push-{stream}"
101
102
103 - project:
104
105     name: opnfv-monitor-docker        # projects which only monitor dedicated file or path
106
107     dockerfile: "Dockerfile"
108     dockerdir: "docker"
109
110     project:
111         # projects with jobs for master
112         - 'daisy':
113             dockerrepo: 'daisy'
114             <<: *master
115         - 'escalator':
116             dockerrepo: 'escalator'
117             <<: *master
118
119     jobs:
120         - '{project}-docker-build-push-monitor-{stream}'
121
122 ########################
123 # job templates
124 ########################
125 - job-template:
126     name: '{dockerrepo}-docker-build-push-{stream}'
127
128     disabled: '{obj:disabled}'
129
130     parameters: &parameters
131         - project-parameter:
132             project: '{project}'
133             branch: '{branch}'
134         - 'opnfv-build-ubuntu-defaults'
135         - string:
136             name: PUSH_IMAGE
137             default: "true"
138             description: "To enable/disable pushing the image to Dockerhub."
139         - string:
140             name: DOCKER_REPO_NAME
141             default: "opnfv/{dockerrepo}"
142             description: "Dockerhub repo to be pushed to."
143         - string:
144             name: DOCKER_DIR
145             default: "{dockerdir}"
146             description: "Directory containing files needed by the Dockerfile"
147         - string:
148             name: COMMIT_ID
149             default: ""
150             description: "commit id to make a snapshot docker image"
151         - string:
152             name: RELEASE_VERSION
153             default: ""
154             description: "Release version, e.g. 1.0, 2.0, 3.0"
155         - string:
156             name: DOCKERFILE
157             default: "{dockerfile}"
158             description: "Dockerfile to use for creating the image."
159
160     scm:
161         - git-scm
162
163     builders: &builders
164         - shell:
165             !include-raw-escape: ./opnfv-docker.sh
166
167     triggers:
168         - pollscm:
169             cron: "*/30 * * * *"
170
171     publishers:
172         - email:
173             recipients: '{receivers}'
174
175 - job-template:
176     name: '{project}-docker-build-push-monitor-{stream}'
177     disabled: '{obj:disabled}'
178     parameters: *parameters
179     scm:
180         - git-scm
181     builders: *builders
182
183     # trigger only matching the file name
184     triggers:
185         - gerrit:
186             trigger-on:
187                 - change-merged-event
188                 - comment-added-contains-event:
189                     comment-contains-value: 'remerge'
190             projects:
191               - project-compare-type: 'ANT'
192                 project-pattern: '{project}'
193                 branches:
194                     - branch-compare-type: 'ANT'
195                       branch-pattern: '**/{branch}'
196                 file-paths:
197                   - compare-type: ANT
198                     pattern: 'docker/**'
199