blob: 009c86ec449cb4151d1155db555308d001e97df3 [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>
Tal Gitelman0c3b1892017-10-04 16:56:23 +03007 <packaging>pom</packaging>
8
Michael Lando451a3402017-02-19 10:28:42 +02009
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030010 <parent>
11 <groupId>org.openecomp.sdc</groupId>
12 <artifactId>sdc-main</artifactId>
Michael Lando0ad3c802017-09-19 16:32:59 +030013 <version>1.2.0-SNAPSHOT</version>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030014 </parent>
Michael Lando451a3402017-02-19 10:28:42 +020015
Michael Landoed64b5e2017-06-09 03:19:04 +030016
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030017 <properties>
18 <docker.tag>${project.version}-${maven.build.timestamp}</docker.tag>
19 <docker.latest.tag>${project.version}-latest</docker.latest.tag>
20 </properties>
Michael Lando451a3402017-02-19 10:28:42 +020021
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030022 <build>
23 <plugins>
24 <plugin>
25 <artifactId>maven-clean-plugin</artifactId>
26 <version>3.0.0</version>
27 <executions>
28 <execution>
29 <id>clean.tosca.chef.os.folder</id>
30 <phase>clean</phase>
31 <goals>
32 <goal>clean</goal>
33 </goals>
34 <configuration>
35 <filesets>
36 <fileset>
Tal Gitelman0c3b1892017-10-04 16:56:23 +030037 <directory>${project.basedir}\sdc-cassandra\chef-repo\cookbooks\cassandra-actions\attributes\</directory>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030038 <followSymlinks>false</followSymlinks>
39 <includes>
40 <include>**/default.rb</include>
41 </includes>
42 </fileset>
Tal Gitelman0c3b1892017-10-04 16:56:23 +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 <followSymlinks>false</followSymlinks>
47 <includes>
Tal Gitelman004829c2017-09-10 20:06:45 +030048 <include>Artifact-Generator.properties</include>
49 <include>error-configuration.yaml</include>
50 <include>ecomp-error-configuration.yaml</include>
51 <include>logback.xml</include>
52 </includes>
53 </fileset>
Tal Gitelman0c3b1892017-10-04 16:56:23 +030054 <!-- BE WAR's -->
55 <fileset>
56 <directory>${project.parent.basedir}/sdc-os-chef/sdc-backend</directory>
57 <followSymlinks>false</followSymlinks>
58 <includes>
59 <include>*.war</include>
60 </includes>
61 </fileset>
62 <!-- FE WAR's -->
63 <fileset>
64 <directory>${project.parent.basedir}/sdc-os-chef/sdc-frontend/</directory>
65 <followSymlinks>false</followSymlinks>
66 <includes>
67 <include>*.war</include>
68 </includes>
69 </fileset>
70 <fileset>
71 <directory>${project.basedir}/sdc-backend/chef-repo/cookbooks/sdc-normatives/files/default</directory>
72 <followSymlinks>false</followSymlinks>
73 <includes>
74 <include>normatives.tar.gz</include>
75 </includes>
76 </fileset>
Tal Gitelman15c2ce72017-10-18 19:47:40 +030077 <!-- Sanity jar -->
78 <fileset>
79 <directory>${project.basedir}/sdc-sanity</directory>
80 <followSymlinks>false</followSymlinks>
81 <includes>
82 <include>*.jar</include>
83 </includes>
84 </fileset>
85 <!-- Sanity test suites -->
86 <fileset>
87 <directory>${project.basedir}/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/testSuites</directory>
88 <followSymlinks>false</followSymlinks>
89 </fileset>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030090 </filesets>
91 </configuration>
92 </execution>
93 </executions>
94 </plugin>
95 <plugin>
96 <groupId>ru.yaal.maven</groupId>
97 <artifactId>write-text-files-maven-plugin</artifactId>
98 <version>1.1</version>
99 <configuration>
100 <charset>UTF-8</charset>
101 <files>
102 <file>
103 <path>
104 ${project.basedir}\sdc-cassandra\chef-repo\cookbooks\cassandra-actions\attributes\default.rb
105 </path>
106 <lines>
Tal Gitelmanedfe0df2017-10-03 20:39:02 +0300107 <line>normal['version'] = "${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"</line>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300108 </lines>
109 </file>
110 </files>
111 </configuration>
112 <executions>
113 <execution>
114 <id>write-text-files</id>
115 <phase>prepare-package</phase>
116 <goals>
117 <goal>write-text-files</goal>
118 </goals>
119 </execution>
120 </executions>
121 </plugin>
122 </plugins>
123 </build>
Michael Lando9dd269d2017-02-20 01:04:22 +0200124
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300125 <profiles>
126 <profile>
127 <id>docker-staging</id>
128 <properties>
129 <docker.tag>${project.version}-STAGING-${maven.build.timestamp}</docker.tag>
130 <docker.latest.tag>${project.version}-STAGING-latest</docker.latest.tag>
131 </properties>
132 </profile>
Michael Landoed64b5e2017-06-09 03:19:04 +0300133
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300134 <profile>
135 <id>docker</id>
136 <activation>
137 <activeByDefault>false</activeByDefault>
138 </activation>
139 <build>
140 <plugins>
141 <plugin>
142 <artifactId>maven-resources-plugin</artifactId>
143 <version>3.0.2</version>
144 <executions>
145 <execution>
146 <id>copy-resources-apidocs</id>
147 <phase>validate</phase>
148 <goals>
149 <goal>copy-resources</goal>
150 </goals>
151 <configuration>
152 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
153 <resources>
154 <resource>
155 <directory>
156 ${project.parent.basedir}/openecomp-be/tools/swagger-ui/api-docs
157 </directory>
158 <includes>
159 <include>api-docs.war</include>
160 </includes>
161 </resource>
162 </resources>
163 </configuration>
164 </execution>
Tal Gitelman004829c2017-09-10 20:06:45 +0300165
166 <execution>
167 <id>copy-static-configuration-files</id>
168 <phase>validate</phase>
169 <goals>
170 <goal>copy-resources</goal>
171 </goals>
172 <configuration>
173 <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default</outputDirectory>
174 <resources>
175 <resource>
176 <directory>${project.parent.basedir}/catalog-be/src/main/resources/config</directory>
177 <includes>
178 <include>Artifact-Generator.properties</include>
179 <include>error-configuration.yaml</include>
180 <include>ecomp-error-configuration.yaml</include>
181 <include>logback.xml</include>
182 </includes>
183 </resource>
184 </resources>
185 </configuration>
186 </execution>
187
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300188 <execution>
189 <id>copy-resources-be</id>
190 <phase>validate</phase>
191 <goals>
192 <goal>copy-resources</goal>
193 </goals>
194 <configuration>
195 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
196 <resources>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300197 <resource>
198 <directory>${project.parent.basedir}/catalog-be/target</directory>
199 <includes>
200 <include>catalog-be-${project.version}.war</include>
201 </includes>
202 </resource>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300203 <resource>
204 <directory>
205 ${project.parent.basedir}/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/target
206 </directory>
207 <includes>
208 <include>onboarding-be-${project.version}.war</include>
209 </includes>
210 </resource>
211 </resources>
212 </configuration>
213 </execution>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300214
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300215 <execution>
216 <id>copy-resources-fe</id>
217 <phase>validate</phase>
218 <goals>
219 <goal>copy-resources</goal>
220 </goals>
221 <configuration>
222 <outputDirectory>${basedir}/sdc-frontend</outputDirectory>
223 <resources>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300224 <resource>
225 <directory>${project.parent.basedir}/catalog-fe/target</directory>
226 <includes>
227 <include>catalog-fe-${project.version}.war</include>
228 </includes>
229 </resource>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300230 <resource>
231 <directory>${project.parent.basedir}/openecomp-ui/target</directory>
232 <includes>
233 <include>onboarding-fe-${project.version}.war</include>
234 </includes>
235 </resource>
236 </resources>
237 </configuration>
238 </execution>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300239
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300240 <execution>
241 <id>copy-tests-suites</id>
242 <phase>validate</phase>
243 <goals>
244 <goal>copy-resources</goal>
245 </goals>
246 <configuration>
247 <outputDirectory>sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/testSuites</outputDirectory>
248 <resources>
249 <resource>
250 <directory>${project.parent.basedir}/test-apis-ci/src/main/resources/ci/testSuites</directory>
251 <includes>
252 <include>*</include>
253 </includes>
254 </resource>
255 </resources>
256 </configuration>
257 </execution>
258 <execution>
259 <id>copy-resources-test-apis-ci</id>
260 <phase>validate</phase>
261 <goals>
262 <goal>copy-resources</goal>
263 </goals>
264 <configuration>
265 <outputDirectory>${basedir}/sdc-sanity</outputDirectory>
266 <resources>
267 <resource>
268 <directory>${project.parent.basedir}/test-apis-ci/target</directory>
269 <includes>
270 <include>test-apis-ci-${project.version}-jar-with-dependencies.jar</include>
271 </includes>
272 </resource>
273 </resources>
274 </configuration>
275 </execution>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300276 <execution>
277 <id>copy-normatives</id>
278 <phase>validate</phase>
279 <goals>
280 <goal>copy-resources</goal>
281 </goals>
282 <configuration>
283 <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-normatives/files/default</outputDirectory>
284 <resources>
285 <resource>
286 <directory>${project.parent.basedir}/catalog-be/target</directory>
287 <includes>
288 <include>normatives.tar.gz</include>
289 </includes>
290 </resource>
291 </resources>
292 </configuration>
293 </execution>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300294 </executions>
295 </plugin>
Michael Lando9dd269d2017-02-20 01:04:22 +0200296
297
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300298 <plugin>
299 <groupId>io.fabric8</groupId>
300 <artifactId>docker-maven-plugin</artifactId>
301 <version>0.19.1</version>
Michael Lando9dd269d2017-02-20 01:04:22 +0200302
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300303 <configuration>
304 <verbose>true</verbose>
305 <apiVersion>1.23</apiVersion>
Areli Fuss7d2c6052017-09-25 18:24:04 +0300306 <registry>nexus3.onap.org:10003</registry>
Michael Lando9dd269d2017-02-20 01:04:22 +0200307
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300308 <images>
Michael Lando9dd269d2017-02-20 01:04:22 +0200309
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300310 <!-- Build backend image -->
311 <image>
312 <name>openecomp/sdc-backend</name>
313 <alias>sdc-backend</alias>
314 <build>
315 <cleanup>try</cleanup>
316 <dockerFileDir>${project.basedir}/sdc-backend</dockerFileDir>
317 <tags>
318 <tag>${docker.tag}</tag>
Michael Lando3a875fb2017-09-23 18:37:09 +0300319 <tag>${docker.latest.tag}</tag>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300320 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
321 </tags>
322 </build>
323 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200324
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300325 <!-- Build frontend image -->
326 <image>
327 <name>openecomp/sdc-frontend</name>
328 <alias>sdc-frontend</alias>
329 <build>
330 <cleanup>try</cleanup>
331 <dockerFileDir>${project.basedir}/sdc-frontend</dockerFileDir>
332 <tags>
333 <tag>${docker.tag}</tag>
334 <tag>${docker.latest.tag}</tag>
335 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
336 </tags>
337 </build>
338 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200339
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300340 <!-- Build elastic search image -->
341 <image>
342 <name>openecomp/sdc-elasticsearch</name>
343 <alias>sdc-elasticsearch</alias>
344 <build>
345 <cleanup>try</cleanup>
346 <dockerFileDir>${project.basedir}/sdc-elasticsearch</dockerFileDir>
347 <tags>
348 <tag>${docker.tag}</tag>
349 <tag>${docker.latest.tag}</tag>
350 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
351 </tags>
352 </build>
353 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200354
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300355 <!-- Build kibana image -->
356 <image>
357 <name>openecomp/sdc-kibana</name>
358 <alias>sdc-kibana</alias>
359 <build>
360 <cleanup>try</cleanup>
361 <dockerFileDir>${project.basedir}/sdc-kibana</dockerFileDir>
362 <tags>
363 <tag>${docker.tag}</tag>
364 <tag>${docker.latest.tag}</tag>
365 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
366 </tags>
367 </build>
368 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200369
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300370 <!-- Build cassandra image -->
371 <image>
372 <name>openecomp/sdc-cassandra</name>
373 <alias>sdc-cassandra</alias>
374 <build>
375 <cleanup>try</cleanup>
376 <dockerFileDir>${project.basedir}/sdc-cassandra</dockerFileDir>
377 <tags>
378 <tag>${docker.tag}</tag>
379 <tag>${docker.latest.tag}</tag>
380 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
381 </tags>
382 </build>
383 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200384
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300385 <!-- Build sanity image -->
386 <image>
387 <name>openecomp/sdc-sanity</name>
388 <alias>sdc-sanity</alias>
389 <build>
390 <cleanup>try</cleanup>
391 <dockerFileDir>${project.basedir}/sdc-sanity</dockerFileDir>
392 <tags>
393 <tag>${docker.tag}</tag>
394 <tag>${docker.latest.tag}</tag>
Tal Gitelman15c2ce72017-10-18 19:47:40 +0300395 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300396 </tags>
397 </build>
398 </image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300399
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300400 </images>
401 </configuration>
402 <executions>
403 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300404 <id>clean-images</id>
405 <phase>pre-clean</phase>
406 <goals>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300407 <goal>remove</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300408 </goals>
409 <configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300410 <removeAll>true</removeAll>
411 <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 +0300412 </configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300413 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200414
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300415 <execution>
416 <id>generate-images</id>
417 <phase>package</phase>
418 <goals>
419 <goal>build</goal>
420 </goals>
421 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200422
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300423 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300424 <id>push-images</id>
425 <phase>deploy</phase>
426 <goals>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300427 <goal>build</goal>
428 <goal>push</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300429 </goals>
430 <configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300431 <image>
432 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 +0300433 </configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300434 </execution>
435 </executions>
436 </plugin>
437 </plugins>
438 </build>
439 </profile>
440 </profiles>
Michael Lando451a3402017-02-19 10:28:42 +0200441</project>