blob: 9fec52d23e096171323363ef33dc849c4cb43122 [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>
Idan Amit7cb00e62017-10-26 10:02:20 +0300307 <authConfig>
Idan Amitbc51da22017-10-26 16:56:53 +0300308 <pull>
309 <username>docker</username>
310 <password>docker</password>
311 </pull>
312 </authConfig>
Michael Lando9dd269d2017-02-20 01:04:22 +0200313
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300314 <images>
Michael Lando9dd269d2017-02-20 01:04:22 +0200315
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300316 <!-- Build backend image -->
317 <image>
318 <name>openecomp/sdc-backend</name>
319 <alias>sdc-backend</alias>
320 <build>
321 <cleanup>try</cleanup>
322 <dockerFileDir>${project.basedir}/sdc-backend</dockerFileDir>
323 <tags>
324 <tag>${docker.tag}</tag>
Michael Lando3a875fb2017-09-23 18:37:09 +0300325 <tag>${docker.latest.tag}</tag>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300326 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
327 </tags>
328 </build>
329 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200330
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300331 <!-- Build frontend image -->
332 <image>
333 <name>openecomp/sdc-frontend</name>
334 <alias>sdc-frontend</alias>
335 <build>
336 <cleanup>try</cleanup>
337 <dockerFileDir>${project.basedir}/sdc-frontend</dockerFileDir>
338 <tags>
339 <tag>${docker.tag}</tag>
340 <tag>${docker.latest.tag}</tag>
341 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
342 </tags>
343 </build>
344 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200345
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300346 <!-- Build elastic search image -->
347 <image>
348 <name>openecomp/sdc-elasticsearch</name>
349 <alias>sdc-elasticsearch</alias>
350 <build>
351 <cleanup>try</cleanup>
352 <dockerFileDir>${project.basedir}/sdc-elasticsearch</dockerFileDir>
353 <tags>
354 <tag>${docker.tag}</tag>
355 <tag>${docker.latest.tag}</tag>
356 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
357 </tags>
358 </build>
359 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200360
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300361 <!-- Build kibana image -->
362 <image>
363 <name>openecomp/sdc-kibana</name>
364 <alias>sdc-kibana</alias>
365 <build>
366 <cleanup>try</cleanup>
367 <dockerFileDir>${project.basedir}/sdc-kibana</dockerFileDir>
368 <tags>
369 <tag>${docker.tag}</tag>
370 <tag>${docker.latest.tag}</tag>
371 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
372 </tags>
373 </build>
374 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200375
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300376 <!-- Build cassandra image -->
377 <image>
378 <name>openecomp/sdc-cassandra</name>
379 <alias>sdc-cassandra</alias>
380 <build>
381 <cleanup>try</cleanup>
382 <dockerFileDir>${project.basedir}/sdc-cassandra</dockerFileDir>
383 <tags>
384 <tag>${docker.tag}</tag>
385 <tag>${docker.latest.tag}</tag>
386 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
387 </tags>
388 </build>
389 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200390
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300391 <!-- Build sanity image -->
392 <image>
393 <name>openecomp/sdc-sanity</name>
394 <alias>sdc-sanity</alias>
395 <build>
396 <cleanup>try</cleanup>
397 <dockerFileDir>${project.basedir}/sdc-sanity</dockerFileDir>
398 <tags>
399 <tag>${docker.tag}</tag>
400 <tag>${docker.latest.tag}</tag>
Tal Gitelman15c2ce72017-10-18 19:47:40 +0300401 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300402 </tags>
403 </build>
404 </image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300405
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300406 </images>
407 </configuration>
408 <executions>
409 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300410 <id>clean-images</id>
411 <phase>pre-clean</phase>
412 <goals>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300413 <goal>remove</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300414 </goals>
415 <configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300416 <removeAll>true</removeAll>
417 <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 +0300418 </configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300419 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200420
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300421 <execution>
422 <id>generate-images</id>
423 <phase>package</phase>
424 <goals>
425 <goal>build</goal>
426 </goals>
427 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200428
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300429 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300430 <id>push-images</id>
431 <phase>deploy</phase>
432 <goals>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300433 <goal>push</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300434 </goals>
435 <configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300436 <image>
437 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 +0300438 </configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300439 </execution>
440 </executions>
441 </plugin>
442 </plugins>
443 </build>
444 </profile>
445 </profiles>
Michael Lando451a3402017-02-19 10:28:42 +0200446</project>