blob: f88b8bebfadfe60b60ce7f6d2230cd14822d576e [file] [log] [blame]
ChrisC025301d2017-01-31 11:40:03 +01001<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Anaël Clossonf15b97e2017-02-08 10:46:48 +01002 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Rob Daughertye8000512018-08-01 00:02:38 -04003
ChrisC025301d2017-01-31 11:40:03 +01004 <modelVersion>4.0.0</modelVersion>
5
6 <parent>
Arthur Martella22e015f2018-02-22 14:24:40 -05007 <groupId>org.onap.so</groupId>
ChrisC025301d2017-01-31 11:40:03 +01008 <artifactId>packages</artifactId>
Benjamin, Max (mb388a)5a6a6de2018-07-30 15:56:09 -04009 <version>1.3.0-SNAPSHOT</version>
ChrisC025301d2017-01-31 11:40:03 +010010 </parent>
11
12 <packaging>pom</packaging>
ChrisC025301d2017-01-31 11:40:03 +010013 <artifactId>docker</artifactId>
Rob Daughertye8000512018-08-01 00:02:38 -040014 <name>Docker Images</name>
15 <description>Docker Images</description>
ChrisC025301d2017-01-31 11:40:03 +010016
17 <properties>
18 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
19 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Rob Daughertye8000512018-08-01 00:02:38 -040020 <so.project.version>${project.version}</so.project.version>
21 <docker.skip>false</docker.skip>
22 <docker.skip.build>false</docker.skip.build>
23 <docker.skip.push>false</docker.skip.push>
Rob Daughertyf5893182018-04-05 16:09:32 -040024 <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
25 <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
ChrisC025301d2017-01-31 11:40:03 +010026 </properties>
27
28 <build>
29 <finalName>${project.artifactId}-${project.version}</finalName>
30 <plugins>
31 <plugin>
Rob Daughertye8000512018-08-01 00:02:38 -040032 <groupId>org.codehaus.groovy.maven</groupId>
33 <artifactId>gmaven-plugin</artifactId>
34 <version>1.0</version>
Anaël Closson13e0d022017-02-14 11:17:50 +010035 <executions>
36 <execution>
Rob Daughertye8000512018-08-01 00:02:38 -040037 <phase>validate</phase>
Anaël Closson13e0d022017-02-14 11:17:50 +010038 <goals>
Rob Daughertye8000512018-08-01 00:02:38 -040039 <goal>execute</goal>
Anaël Closson13e0d022017-02-14 11:17:50 +010040 </goals>
Anaël Closson13e0d022017-02-14 11:17:50 +010041 <configuration>
Rob Daughertye8000512018-08-01 00:02:38 -040042 <source>
43 println 'Project version: ' + project.properties['so.project.version'];
44 def versionArray;
45 if ( project.properties['so.project.version'] != null ) {
46 versionArray = project.properties['so.project.version'].split('-');
47 }
48
49 if ( project.properties['so.project.version'].endsWith("-SNAPSHOT") ) {
50 project.properties['project.docker.latesttag.version']=versionArray[0] + "-SNAPSHOT-latest";
51 } else {
Rob Daugherty568e98f2018-08-01 10:09:48 -040052 project.properties['project.docker.latesttag.version']=versionArray[0] + "-STAGING-latest";
Rob Daughertye8000512018-08-01 00:02:38 -040053 }
54
55 println 'New tag for docker: ' + project.properties['project.docker.latesttag.version'];
56 </source>
Anaël Closson13e0d022017-02-14 11:17:50 +010057 </configuration>
58 </execution>
59 </executions>
60 </plugin>
Rob Daughertye8000512018-08-01 00:02:38 -040061
Anaël Closson13e0d022017-02-14 11:17:50 +010062 <plugin>
ChrisC025301d2017-01-31 11:40:03 +010063 <groupId>io.fabric8</groupId>
64 <artifactId>docker-maven-plugin</artifactId>
Rob Daughertyf5893182018-04-05 16:09:32 -040065 <version>0.19.1</version>
ChrisC025301d2017-01-31 11:40:03 +010066
67 <configuration>
68 <verbose>true</verbose>
69 <apiVersion>1.23</apiVersion>
Rob Daughertyf5893182018-04-05 16:09:32 -040070 <pullRegistry>${docker.pull.registry}</pullRegistry>
71 <pushRegistry>${docker.push.registry}</pushRegistry>
Anaël Clossonf15b97e2017-02-08 10:46:48 +010072
ChrisC025301d2017-01-31 11:40:03 +010073 <images>
74 <image>
Rob Daughertye8000512018-08-01 00:02:38 -040075 <name>so/base-image:1.0</name>
ChrisC025301d2017-01-31 11:40:03 +010076 <build>
77 <cleanup>try</cleanup>
78 <dockerFileDir>docker-files</dockerFileDir>
Rob Daughertye8000512018-08-01 00:02:38 -040079 <dockerFile>Dockerfile.so-base-image</dockerFile>
ChrisC025301d2017-01-31 11:40:03 +010080 </build>
81 </image>
82 <image>
Rob Daughertye8000512018-08-01 00:02:38 -040083 <name>so/catalog-db-adapter</name>
ChrisC025301d2017-01-31 11:40:03 +010084 <build>
ChrisC025301d2017-01-31 11:40:03 +010085 <cleanup>try</cleanup>
86 <dockerFileDir>docker-files</dockerFileDir>
Rob Daughertye8000512018-08-01 00:02:38 -040087 <dockerFile>Dockerfile.so-app</dockerFile>
JulienBec3f8ddf2017-03-08 02:19:21 -080088 <tags>
Rob Daughertye8000512018-08-01 00:02:38 -040089 <tag>${project.version}</tag>
90 <tag>${project.version}-${maven.build.timestamp}</tag>
Determe, Sebastien (sd378r)94ee9252017-05-02 03:53:18 -070091 <tag>${project.docker.latesttag.version}</tag>
JulienBec3f8ddf2017-03-08 02:19:21 -080092 </tags>
ChrisC025301d2017-01-31 11:40:03 +010093 <assembly>
Rob Daughertye8000512018-08-01 00:02:38 -040094 <inline>
95 <dependencySets>
96 <dependencySet>
97 <includes>
98 <include>org.onap.so.adapters:mso-catalog-db-adapter</include>
99 </includes>
100 <outputFileNameMapping>app.jar</outputFileNameMapping>
101 </dependencySet>
102 </dependencySets>
103 </inline>
ChrisC025301d2017-01-31 11:40:03 +0100104 </assembly>
105 </build>
106 </image>
Rob Daughertye8000512018-08-01 00:02:38 -0400107 <image>
108 <name>so/requests-db-adapter</name>
109 <build>
110 <cleanup>try</cleanup>
111 <dockerFileDir>docker-files</dockerFileDir>
112 <dockerFile>Dockerfile.so-app</dockerFile>
113 <tags>
114 <tag>${project.version}</tag>
115 <tag>${project.version}-${maven.build.timestamp}</tag>
116 <tag>${project.docker.latesttag.version}</tag>
117 </tags>
118 <assembly>
119 <inline>
120 <dependencySets>
121 <dependencySet>
122 <includes>
123 <include>org.onap.so.adapters:mso-requests-db-adapter</include>
124 </includes>
125 <outputFileNameMapping>app.jar</outputFileNameMapping>
126 </dependencySet>
127 </dependencySets>
128 </inline>
129 </assembly>
130 </build>
131 </image>
132 <image>
133 <name>so/sdnc-adapter</name>
134 <build>
135 <cleanup>try</cleanup>
136 <dockerFileDir>docker-files</dockerFileDir>
137 <dockerFile>Dockerfile.so-app</dockerFile>
138 <tags>
139 <tag>${project.version}</tag>
140 <tag>${project.version}-${maven.build.timestamp}</tag>
141 <tag>${project.docker.latesttag.version}</tag>
142 </tags>
143 <assembly>
144 <inline>
145 <dependencySets>
146 <dependencySet>
147 <includes>
148 <include>org.onap.so:mso-sdnc-adapter</include>
149 </includes>
150 <outputFileNameMapping>app.jar</outputFileNameMapping>
151 </dependencySet>
152 </dependencySets>
153 </inline>
154 </assembly>
155 </build>
156 </image>
157 <image>
158 <name>so/openstack-adapters</name>
159 <build>
160 <cleanup>try</cleanup>
161 <dockerFileDir>docker-files</dockerFileDir>
162 <dockerFile>Dockerfile.so-app</dockerFile>
163 <tags>
164 <tag>${project.version}</tag>
165 <tag>${project.version}-${maven.build.timestamp}</tag>
166 <tag>${project.docker.latesttag.version}</tag>
167 </tags>
168 <assembly>
169 <inline>
170 <dependencySets>
171 <dependencySet>
172 <includes>
173 <include>org.onap.so:mso-openstack-adapters</include>
174 </includes>
175 <outputFileNameMapping>app.jar</outputFileNameMapping>
176 </dependencySet>
177 </dependencySets>
178 </inline>
179 </assembly>
180 </build>
181 </image>
182 <image>
183 <name>so/asdc-controller</name>
184 <build>
185 <cleanup>try</cleanup>
186 <dockerFileDir>docker-files</dockerFileDir>
187 <dockerFile>Dockerfile.so-app</dockerFile>
188 <tags>
189 <tag>${project.version}</tag>
190 <tag>${project.version}-${maven.build.timestamp}</tag>
191 <tag>${project.docker.latesttag.version}</tag>
192 </tags>
193 <assembly>
194 <inline>
195 <dependencySets>
196 <dependencySet>
197 <includes>
198 <include>org.onap.so:asdc-controller</include>
199 </includes>
200 <outputFileNameMapping>app.jar</outputFileNameMapping>
201 </dependencySet>
202 </dependencySets>
203 </inline>
204 </assembly>
205 </build>
206 </image>
207 <image>
208 <name>so/bpmn-infra</name>
209 <build>
210 <cleanup>try</cleanup>
211 <dockerFileDir>docker-files</dockerFileDir>
212 <dockerFile>Dockerfile.so-app</dockerFile>
213 <tags>
214 <tag>${project.version}</tag>
215 <tag>${project.version}-${maven.build.timestamp}</tag>
216 <tag>${project.docker.latesttag.version}</tag>
217 </tags>
218 <assembly>
219 <inline>
220 <dependencySets>
221 <dependencySet>
222 <includes>
223 <include>org.onap.so:mso-infrastructure-bpmn</include>
224 </includes>
225 <outputFileNameMapping>app.jar</outputFileNameMapping>
226 </dependencySet>
227 </dependencySets>
228 </inline>
229 </assembly>
230 </build>
231 </image>
232 <image>
233 <name>so/api-handler-infra</name>
234 <build>
235 <cleanup>try</cleanup>
236 <dockerFileDir>docker-files</dockerFileDir>
237 <dockerFile>Dockerfile.so-app</dockerFile>
238 <tags>
239 <tag>${project.version}</tag>
240 <tag>${project.version}-${maven.build.timestamp}</tag>
241 <tag>${project.docker.latesttag.version}</tag>
242 </tags>
243 <assembly>
244 <inline>
245 <dependencySets>
246 <dependencySet>
247 <includes>
248 <include>org.onap.so:mso-api-handler-infra</include>
249 </includes>
250 <outputFileNameMapping>app.jar</outputFileNameMapping>
251 </dependencySet>
252 </dependencySets>
253 </inline>
254 </assembly>
255 </build>
256 </image>
ChrisC025301d2017-01-31 11:40:03 +0100257 </images>
258 </configuration>
Rob Daughertye8000512018-08-01 00:02:38 -0400259
ChrisC025301d2017-01-31 11:40:03 +0100260 <executions>
261 <execution>
262 <id>clean-images</id>
263 <phase>pre-clean</phase>
264 <goals>
265 <goal>remove</goal>
266 </goals>
267 <configuration>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100268 <removeAll>true</removeAll>
ChrisC025301d2017-01-31 11:40:03 +0100269 </configuration>
270 </execution>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100271
ChrisC025301d2017-01-31 11:40:03 +0100272 <execution>
273 <id>generate-images</id>
274 <phase>generate-sources</phase>
275 <goals>
276 <goal>build</goal>
277 </goals>
278 </execution>
279
280 <execution>
281 <id>push-images</id>
282 <phase>deploy</phase>
283 <goals>
284 <goal>build</goal>
285 <goal>push</goal>
286 </goals>
287 <configuration>
Rob Daughertye8000512018-08-01 00:02:38 -0400288 <image>so/catalog-db-adapter,so/requests-db-adapter,so/sdnc-adapter,so/openstack-adapters,so/asdc-controller,so/bpmn-infra,so/api-handler-infra</image>
ChrisC025301d2017-01-31 11:40:03 +0100289 </configuration>
290 </execution>
291 </executions>
ChrisC025301d2017-01-31 11:40:03 +0100292 </plugin>
293
294 <plugin>
295 <groupId>org.apache.maven.plugins</groupId>
296 <artifactId>maven-deploy-plugin</artifactId>
297 <version>2.8</version>
298 <configuration>
299 <skip>true</skip>
300 </configuration>
301 </plugin>
302 </plugins>
303 </build>
304
Rob Daughertye8000512018-08-01 00:02:38 -0400305 <dependencies>
306 <dependency>
307 <groupId>org.onap.so.adapters</groupId>
308 <artifactId>mso-catalog-db-adapter</artifactId>
309 <version>${project.version}</version>
310 </dependency>
311 <dependency>
312 <groupId>org.onap.so.adapters</groupId>
313 <artifactId>mso-requests-db-adapter</artifactId>
314 <version>${project.version}</version>
315 </dependency>
316 <dependency>
317 <groupId>org.onap.so</groupId>
318 <artifactId>mso-sdnc-adapter</artifactId>
319 <version>${project.version}</version>
320 </dependency>
321 <dependency>
322 <groupId>org.onap.so</groupId>
323 <artifactId>mso-openstack-adapters</artifactId>
324 <version>${project.version}</version>
325 </dependency>
326 <dependency>
327 <groupId>org.onap.so</groupId>
328 <artifactId>asdc-controller</artifactId>
329 <version>${project.version}</version>
330 </dependency>
331 <dependency>
332 <groupId>org.onap.so</groupId>
333 <artifactId>mso-infrastructure-bpmn</artifactId>
334 <version>${project.version}</version>
335 </dependency>
336 <dependency>
337 <groupId>org.onap.so</groupId>
338 <artifactId>mso-api-handler-infra</artifactId>
339 <version>${project.version}</version>
340 </dependency>
341 </dependencies>
Anaël Clossonf15b97e2017-02-08 10:46:48 +0100342</project>