blob: 451fc88a3ed480f2b7222839598a3ebcc184f46c [file] [log] [blame]
Michael Lando451a3402017-02-19 10:28:42 +02001<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
ml636ra90804d2017-02-22 15:50:20 +02002 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Michael Lando451a3402017-02-19 10:28:42 +02003
4 <modelVersion>4.0.0</modelVersion>
5
6 <artifactId>sdc-os-chef</artifactId>
7
8 <parent>
9 <groupId>org.openecomp.sdc</groupId>
10 <artifactId>sdc-main</artifactId>
Michael Landoebd7c8f2017-03-15 20:38:00 +020011 <version>1.1.0-SNAPSHOT</version>
Michael Lando451a3402017-02-19 10:28:42 +020012 </parent>
13
ig6133142d2e62017-04-02 17:14:00 +030014 <properties>
ig6133538b8262017-04-06 12:50:11 +030015 <docker.tag>${project.version}-${maven.build.timestamp}</docker.tag>
16 <docker.latest.tag>${project.version}-latest</docker.latest.tag>
ig6133142d2e62017-04-02 17:14:00 +030017 </properties>
Michael Lando451a3402017-02-19 10:28:42 +020018
Michael Lando9dd269d2017-02-20 01:04:22 +020019 <build>
20 <plugins>
21 <plugin>
22 <groupId>com.google.code.maven-replacer-plugin</groupId>
23 <artifactId>replacer</artifactId>
24 <version>1.5.3</version>
25 <executions>
26 <execution>
27 <phase>prepare-package</phase>
28 <goals>
29 <goal>replace</goal>
30 </goals>
31 </execution>
32 </executions>
33
34 <configuration>
35 <basedir>${project.basedir}</basedir>
36 <includes>
37 <include>sdc-backend/Dockerfile</include>
38 <include>sdc-frontend/Dockerfile</include>
39 <include>scripts/docker_run.sh</include>
40 </includes>
41 <replacements>
42 <replacement>
43 <token>__SDC-RELEASE__</token>
44 <value>${project.version}</value>
45 </replacement>
46 </replacements>
47 </configuration>
48 </plugin>
49 </plugins>
Michael Lando451a3402017-02-19 10:28:42 +020050 </build>
Michael Lando9dd269d2017-02-20 01:04:22 +020051
52 <profiles>
53 <profile>
ig6133142d2e62017-04-02 17:14:00 +030054 <id>docker-staging</id>
55 <properties>
ig61330f572ce2017-04-06 10:48:50 +030056 <docker.tag>${project.version}-STAGING-${maven.build.timestamp}</docker.tag>
57 <docker.latest.tag>${project.version}-STAGING-latest</docker.latest.tag>
ig6133142d2e62017-04-02 17:14:00 +030058 </properties>
59 </profile>
60 <profile>
Michael Lando9dd269d2017-02-20 01:04:22 +020061 <id>docker</id>
62 <build>
63 <plugins>
64 <plugin>
65 <artifactId>maven-resources-plugin</artifactId>
66 <version>3.0.2</version>
67 <executions>
68 <execution>
69 <id>copy-resources-be</id>
70 <!-- here the phase you need -->
71 <phase>validate</phase>
72 <goals>
73 <goal>copy-resources</goal>
74 </goals>
75 <configuration>
76 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
77 <resources>
78 <resource>
79 <directory>${project.parent.basedir}/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/target</directory>
80 <includes>
81 <include>onboarding-be-*.war</include>
82 </includes>
83 </resource>
84 </resources>
85 </configuration>
86 </execution>
87 <execution>
88 <id>copy-resources-fe</id>
89 <!-- here the phase you need -->
90 <phase>validate</phase>
91 <goals>
92 <goal>copy-resources</goal>
93 </goals>
94 <configuration>
95 <outputDirectory>${basedir}/sdc-frontend</outputDirectory>
96 <resources>
97 <resource>
David Greenberg3d35bb32017-02-20 19:00:11 +020098 <directory>${project.parent.basedir}/openecomp-ui/target</directory>
Michael Lando9dd269d2017-02-20 01:04:22 +020099 <includes>
David Greenberg3d35bb32017-02-20 19:00:11 +0200100 <include>onboarding-fe-${project.version}.war</include>
Michael Lando9dd269d2017-02-20 01:04:22 +0200101 </includes>
102 </resource>
103 </resources>
104 </configuration>
105 </execution>
Grinberg Motic3bda482017-02-23 11:24:34 +0200106 <execution>
107 <id>copy-resources-sanity</id>
108 <!-- here the phase you need -->
109 <phase>validate</phase>
110 <goals>
111 <goal>copy-resources</goal>
112 </goals>
113 <configuration>
114 <outputDirectory>${basedir}/sdc-frontend</outputDirectory>
115 <resources>
116 <resource>
117 <directory>${project.parent.basedir}/openecomp-ui/target</directory>
118 <includes>
119 <include>onboarding-fe-${project.version}.war</include>
120 </includes>
121 </resource>
122 </resources>
123 </configuration>
124 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200125 </executions>
126 </plugin>
127
128
129
130 <plugin>
131 <groupId>io.fabric8</groupId>
132 <artifactId>docker-maven-plugin</artifactId>
Michael Lando9dc57092017-02-20 23:46:47 +0200133 <version>0.19.1</version>
Michael Lando9dd269d2017-02-20 01:04:22 +0200134
135 <configuration>
136 <verbose>true</verbose>
137 <apiVersion>1.23</apiVersion>
138
139 <images>
140
141 <!-- Build backend image -->
142 <image>
ig61330f572ce2017-04-06 10:48:50 +0300143 <name>openecomp/sdc-backend</name>
Michael Lando9dd269d2017-02-20 01:04:22 +0200144 <alias>sdc-backend</alias>
145 <build>
146 <cleanup>try</cleanup>
Michael Lando9dc57092017-02-20 23:46:47 +0200147 <dockerFileDir>${project.basedir}/sdc-backend</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300148 <tags>
149 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300150 <tag>${docker.latest.tag}</tag>
Michael Lando885324e2017-05-17 21:14:11 +0300151 <tag>1.1-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300152 </tags>
Michael Lando9dd269d2017-02-20 01:04:22 +0200153 </build>
154 </image>
155
156 <!-- Build frontend image -->
157 <image>
ig61330f572ce2017-04-06 10:48:50 +0300158 <name>openecomp/sdc-frontend</name>
Michael Lando9dd269d2017-02-20 01:04:22 +0200159 <alias>sdc-frontend</alias>
160 <build>
161 <cleanup>try</cleanup>
Michael Lando9dc57092017-02-20 23:46:47 +0200162 <dockerFileDir>${project.basedir}/sdc-frontend</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300163 <tags>
164 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300165 <tag>${docker.latest.tag}</tag>
Michael Lando885324e2017-05-17 21:14:11 +0300166 <tag>1.1-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300167 </tags>
Michael Lando9dd269d2017-02-20 01:04:22 +0200168 </build>
169 </image>
170
171 <!-- Build elastic search image -->
Michael Lando36771962017-03-01 10:05:34 +0200172 <image>
ig61330f572ce2017-04-06 10:48:50 +0300173 <name>openecomp/sdc-elasticsearch</name>
Michael Lando9dd269d2017-02-20 01:04:22 +0200174 <alias>sdc-elasticsearch</alias>
175 <build>
176 <cleanup>try</cleanup>
Michael Lando9dc57092017-02-20 23:46:47 +0200177 <dockerFileDir>${project.basedir}/sdc-elasticsearch</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300178 <tags>
179 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300180 <tag>${docker.latest.tag}</tag>
Michael Lando885324e2017-05-17 21:14:11 +0300181 <tag>1.1-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300182 </tags>
Michael Lando9dd269d2017-02-20 01:04:22 +0200183 </build>
Michael Lando36771962017-03-01 10:05:34 +0200184 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200185
186 <!-- Build kibana image -->
187 <image>
ig61330f572ce2017-04-06 10:48:50 +0300188 <name>openecomp/sdc-kibana</name>
Michael Lando9dd269d2017-02-20 01:04:22 +0200189 <alias>sdc-kibana</alias>
190 <build>
191 <cleanup>try</cleanup>
Michael Lando9dc57092017-02-20 23:46:47 +0200192 <dockerFileDir>${project.basedir}/sdc-kibana</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300193 <tags>
194 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300195 <tag>${docker.latest.tag}</tag>
Michael Lando885324e2017-05-17 21:14:11 +0300196 <tag>1.1-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300197 </tags>
Michael Lando9dd269d2017-02-20 01:04:22 +0200198 </build>
199 </image>
200
David Greenberg3d35bb32017-02-20 19:00:11 +0200201 <!-- Build cassandra image -->
Michael Lando9dd269d2017-02-20 01:04:22 +0200202 <image>
ig61330f572ce2017-04-06 10:48:50 +0300203 <name>openecomp/sdc-cassandra</name>
Michael Lando9dd269d2017-02-20 01:04:22 +0200204 <alias>sdc-cassandra</alias>
205 <build>
206 <cleanup>try</cleanup>
Michael Lando9dc57092017-02-20 23:46:47 +0200207 <dockerFileDir>${project.basedir}/sdc-cassandra</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300208 <tags>
209 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300210 <tag>${docker.latest.tag}</tag>
Michael Lando885324e2017-05-17 21:14:11 +0300211 <tag>1.1-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300212 </tags>
Michael Lando9dd269d2017-02-20 01:04:22 +0200213 </build>
214 </image>
Grinberg Motic3bda482017-02-23 11:24:34 +0200215
216 <!-- Build sanity image -->
217 <image>
ig61330f572ce2017-04-06 10:48:50 +0300218 <name>openecomp/sdc-sanity</name>
Grinberg Motic3bda482017-02-23 11:24:34 +0200219 <alias>sdc-sanity</alias>
220 <build>
221 <cleanup>try</cleanup>
222 <dockerFileDir>${project.basedir}/sdc-sanity</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300223 <tags>
224 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300225 <tag>${docker.latest.tag}</tag>
Michael Lando885324e2017-05-17 21:14:11 +0300226 <tag>1.1-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300227 </tags>
Grinberg Motic3bda482017-02-23 11:24:34 +0200228 </build>
229 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200230
231 </images>
232 </configuration>
233 <executions>
234 <execution>
ml636ra90804d2017-02-22 15:50:20 +0200235 <id>clean-images</id>
236 <phase>pre-clean</phase>
237 <goals>
238 <goal>remove</goal>
239 </goals>
240 <configuration>
241 <removeAll>true</removeAll>
ig61330f572ce2017-04-06 10:48:50 +0300242 <image>openecomp/sdc-backend,openecomp/sdc-frontend,openecomp/sdc-elasticsearch,openecomp/sdc-kibana,openecomp/sdc-sanity</image>
ml636ra90804d2017-02-22 15:50:20 +0200243 </configuration>
Michael Lando9dd269d2017-02-20 01:04:22 +0200244 </execution>
245
246 <execution>
247 <id>generate-images</id>
248 <phase>package</phase>
249 <goals>
250 <goal>build</goal>
251 </goals>
252 </execution>
253
254 <execution>
ml636ra90804d2017-02-22 15:50:20 +0200255 <id>push-images</id>
256 <phase>deploy</phase>
257 <goals>
258 <goal>push</goal>
259 </goals>
260 <configuration>
ig61330f572ce2017-04-06 10:48:50 +0300261 <image>openecomp/sdc-backend,openecomp/sdc-frontend,openecomp/sdc-elasticsearch,openecomp/sdc-kibana,openecomp/sdc-sanity</image>
ml636ra90804d2017-02-22 15:50:20 +0200262 </configuration>
Michael Lando9dd269d2017-02-20 01:04:22 +0200263 </execution>
264 </executions>
265
266 </plugin>
267
268 </plugins>
269 </build>
270 </profile>
271 </profiles>
Michael Lando451a3402017-02-19 10:28:42 +0200272</project>