blob: 1e24e26d72396974bc87c969e5cd4158e6db5c24 [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"
Yuli Shlosberg9dde9262017-09-12 14:11:48 +03002 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
Yuli Shlosberg9dde9262017-09-12 14:11:48 +03004 <modelVersion>4.0.0</modelVersion>
Michael Lando451a3402017-02-19 10:28:42 +02005
Yuli Shlosberg9dde9262017-09-12 14:11:48 +03006 <artifactId>sdc-os-chef</artifactId>
Michael Lando451a3402017-02-19 10:28:42 +02007
Yuli Shlosberg9dde9262017-09-12 14:11:48 +03008 <parent>
9 <groupId>org.openecomp.sdc</groupId>
10 <artifactId>sdc-main</artifactId>
Michael Lando0ad3c802017-09-19 16:32:59 +030011 <version>1.2.0-SNAPSHOT</version>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030012 </parent>
Michael Lando451a3402017-02-19 10:28:42 +020013
Michael Landoed64b5e2017-06-09 03:19:04 +030014
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030015 <properties>
16 <docker.tag>${project.version}-${maven.build.timestamp}</docker.tag>
17 <docker.latest.tag>${project.version}-latest</docker.latest.tag>
18 </properties>
Michael Lando451a3402017-02-19 10:28:42 +020019
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030020 <build>
21 <plugins>
22 <plugin>
23 <artifactId>maven-clean-plugin</artifactId>
24 <version>3.0.0</version>
25 <executions>
26 <execution>
27 <id>clean.tosca.chef.os.folder</id>
28 <phase>clean</phase>
29 <goals>
30 <goal>clean</goal>
31 </goals>
32 <configuration>
33 <filesets>
34 <fileset>
35 <directory>
36 ${project.basedir}\sdc-cassandra\chef-repo\cookbooks\cassandra-actions\attributes\
37 </directory>
38 <followSymlinks>false</followSymlinks>
39 <includes>
40 <include>**/default.rb</include>
41 </includes>
42 </fileset>
Tal Gitelman004829c2017-09-10 20:06:45 +030043 <!-- static configuration files -->
44 <fileset>
45 <directory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default</directory>
46 <includes>
47 <include>Artifact-Generator.properties</include>
48 <include>error-configuration.yaml</include>
49 <include>ecomp-error-configuration.yaml</include>
50 <include>logback.xml</include>
51 </includes>
52 </fileset>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030053 </filesets>
54 </configuration>
55 </execution>
56 </executions>
57 </plugin>
58 <plugin>
59 <groupId>ru.yaal.maven</groupId>
60 <artifactId>write-text-files-maven-plugin</artifactId>
61 <version>1.1</version>
62 <configuration>
63 <charset>UTF-8</charset>
64 <files>
65 <file>
66 <path>
67 ${project.basedir}\sdc-cassandra\chef-repo\cookbooks\cassandra-actions\attributes\default.rb
68 </path>
69 <lines>
70 <line>normal['version'] =
71 "${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"
72 </line>
73 </lines>
74 </file>
75 </files>
76 </configuration>
77 <executions>
78 <execution>
79 <id>write-text-files</id>
80 <phase>prepare-package</phase>
81 <goals>
82 <goal>write-text-files</goal>
83 </goals>
84 </execution>
85 </executions>
86 </plugin>
87 </plugins>
88 </build>
Michael Lando9dd269d2017-02-20 01:04:22 +020089
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030090 <profiles>
91 <profile>
92 <id>docker-staging</id>
93 <properties>
94 <docker.tag>${project.version}-STAGING-${maven.build.timestamp}</docker.tag>
95 <docker.latest.tag>${project.version}-STAGING-latest</docker.latest.tag>
96 </properties>
97 </profile>
Michael Landoed64b5e2017-06-09 03:19:04 +030098
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030099 <profile>
100 <id>docker</id>
101 <activation>
102 <activeByDefault>false</activeByDefault>
103 </activation>
104 <build>
105 <plugins>
106 <plugin>
107 <artifactId>maven-resources-plugin</artifactId>
108 <version>3.0.2</version>
109 <executions>
110 <execution>
111 <id>copy-resources-apidocs</id>
112 <phase>validate</phase>
113 <goals>
114 <goal>copy-resources</goal>
115 </goals>
116 <configuration>
117 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
118 <resources>
119 <resource>
120 <directory>
121 ${project.parent.basedir}/openecomp-be/tools/swagger-ui/api-docs
122 </directory>
123 <includes>
124 <include>api-docs.war</include>
125 </includes>
126 </resource>
127 </resources>
128 </configuration>
129 </execution>
Tal Gitelman004829c2017-09-10 20:06:45 +0300130
131 <execution>
132 <id>copy-static-configuration-files</id>
133 <phase>validate</phase>
134 <goals>
135 <goal>copy-resources</goal>
136 </goals>
137 <configuration>
138 <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default</outputDirectory>
139 <resources>
140 <resource>
141 <directory>${project.parent.basedir}/catalog-be/src/main/resources/config</directory>
142 <includes>
143 <include>Artifact-Generator.properties</include>
144 <include>error-configuration.yaml</include>
145 <include>ecomp-error-configuration.yaml</include>
146 <include>logback.xml</include>
147 </includes>
148 </resource>
149 </resources>
150 </configuration>
151 </execution>
152
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300153 <execution>
154 <id>copy-resources-be</id>
155 <phase>validate</phase>
156 <goals>
157 <goal>copy-resources</goal>
158 </goals>
159 <configuration>
160 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
161 <resources>
162 <resource>
163 <directory>
164 ${project.parent.basedir}/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/target
165 </directory>
166 <includes>
167 <include>onboarding-be-${project.version}.war</include>
168 </includes>
169 </resource>
170 </resources>
171 </configuration>
172 </execution>
173 <execution>
174 <id>copy-resources-fe</id>
175 <phase>validate</phase>
176 <goals>
177 <goal>copy-resources</goal>
178 </goals>
179 <configuration>
180 <outputDirectory>${basedir}/sdc-frontend</outputDirectory>
181 <resources>
182 <resource>
183 <directory>${project.parent.basedir}/openecomp-ui/target</directory>
184 <includes>
185 <include>onboarding-fe-${project.version}.war</include>
186 </includes>
187 </resource>
188 </resources>
189 </configuration>
190 </execution>
191 <execution>
192 <id>copy-tests-suites</id>
193 <phase>validate</phase>
194 <goals>
195 <goal>copy-resources</goal>
196 </goals>
197 <configuration>
198 <outputDirectory>sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/testSuites</outputDirectory>
199 <resources>
200 <resource>
201 <directory>${project.parent.basedir}/test-apis-ci/src/main/resources/ci/testSuites</directory>
202 <includes>
203 <include>*</include>
204 </includes>
205 </resource>
206 </resources>
207 </configuration>
208 </execution>
209 <execution>
210 <id>copy-resources-test-apis-ci</id>
211 <phase>validate</phase>
212 <goals>
213 <goal>copy-resources</goal>
214 </goals>
215 <configuration>
216 <outputDirectory>${basedir}/sdc-sanity</outputDirectory>
217 <resources>
218 <resource>
219 <directory>${project.parent.basedir}/test-apis-ci/target</directory>
220 <includes>
221 <include>test-apis-ci-${project.version}-jar-with-dependencies.jar</include>
222 </includes>
223 </resource>
224 </resources>
225 </configuration>
226 </execution>
227 </executions>
228 </plugin>
Michael Lando9dd269d2017-02-20 01:04:22 +0200229
230
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300231 <plugin>
232 <groupId>io.fabric8</groupId>
233 <artifactId>docker-maven-plugin</artifactId>
234 <version>0.19.1</version>
Michael Lando9dd269d2017-02-20 01:04:22 +0200235
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300236 <configuration>
237 <verbose>true</verbose>
238 <apiVersion>1.23</apiVersion>
Michael Lando9dd269d2017-02-20 01:04:22 +0200239
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300240 <images>
Michael Lando9dd269d2017-02-20 01:04:22 +0200241
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300242 <!-- Build backend image -->
243 <image>
244 <name>openecomp/sdc-backend</name>
245 <alias>sdc-backend</alias>
246 <build>
247 <cleanup>try</cleanup>
248 <dockerFileDir>${project.basedir}/sdc-backend</dockerFileDir>
249 <tags>
250 <tag>${docker.tag}</tag>
251 <tag>${docker.latest.tag}</tag><tag>$sedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
252 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
253 </tags>
254 </build>
255 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200256
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300257 <!-- Build frontend image -->
258 <image>
259 <name>openecomp/sdc-frontend</name>
260 <alias>sdc-frontend</alias>
261 <build>
262 <cleanup>try</cleanup>
263 <dockerFileDir>${project.basedir}/sdc-frontend</dockerFileDir>
264 <tags>
265 <tag>${docker.tag}</tag>
266 <tag>${docker.latest.tag}</tag>
267 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
268 </tags>
269 </build>
270 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200271
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300272 <!-- Build elastic search image -->
273 <image>
274 <name>openecomp/sdc-elasticsearch</name>
275 <alias>sdc-elasticsearch</alias>
276 <build>
277 <cleanup>try</cleanup>
278 <dockerFileDir>${project.basedir}/sdc-elasticsearch</dockerFileDir>
279 <tags>
280 <tag>${docker.tag}</tag>
281 <tag>${docker.latest.tag}</tag>
282 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
283 </tags>
284 </build>
285 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200286
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300287 <!-- Build kibana image -->
288 <image>
289 <name>openecomp/sdc-kibana</name>
290 <alias>sdc-kibana</alias>
291 <build>
292 <cleanup>try</cleanup>
293 <dockerFileDir>${project.basedir}/sdc-kibana</dockerFileDir>
294 <tags>
295 <tag>${docker.tag}</tag>
296 <tag>${docker.latest.tag}</tag>
297 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
298 </tags>
299 </build>
300 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200301
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300302 <!-- Build cassandra image -->
303 <image>
304 <name>openecomp/sdc-cassandra</name>
305 <alias>sdc-cassandra</alias>
306 <build>
307 <cleanup>try</cleanup>
308 <dockerFileDir>${project.basedir}/sdc-cassandra</dockerFileDir>
309 <tags>
310 <tag>${docker.tag}</tag>
311 <tag>${docker.latest.tag}</tag>
312 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
313 </tags>
314 </build>
315 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200316
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300317 <!-- Build sanity image -->
318 <image>
319 <name>openecomp/sdc-sanity</name>
320 <alias>sdc-sanity</alias>
321 <build>
322 <cleanup>try</cleanup>
323 <dockerFileDir>${project.basedir}/sdc-sanity</dockerFileDir>
324 <tags>
325 <tag>${docker.tag}</tag>
326 <tag>${docker.latest.tag}</tag>
327 <tag>1.1-STAGING-latest</tag>
328 </tags>
329 </build>
330 </image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300331
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300332 </images>
333 </configuration>
334 <executions>
335 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300336 <id>clean-images</id>
337 <phase>pre-clean</phase>
338 <goals>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300339 <goal>remove</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300340 </goals>
341 <configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300342 <removeAll>true</removeAll>
343 <image>openecomp/sdc-backend,openecomp/sdc-frontend,openecomp/sdc-elasticsearch,openecomp/sdc-kibana,openecomp/sdc-sanity<!-- ,openecomp/sdc-sanity --></image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300344 </configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300345 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200346
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300347 <execution>
348 <id>generate-images</id>
349 <phase>package</phase>
350 <goals>
351 <goal>build</goal>
352 </goals>
353 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200354
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300355 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300356 <id>push-images</id>
357 <phase>deploy</phase>
358 <goals>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300359 <goal>build</goal>
360 <goal>push</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300361 </goals>
362 <configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300363 <image>
364 openecomp/sdc-backend,openecomp/sdc-frontend,openecomp/sdc-elasticsearch,openecomp/sdc-kibana,openecomp/sdc-sanity<!-- ,openecomp/sdc-sanity --></image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300365 </configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300366 </execution>
367 </executions>
368 </plugin>
369 </plugins>
370 </build>
371 </profile>
372 </profiles>
Michael Lando451a3402017-02-19 10:28:42 +0200373</project>