blob: 21dcdc8e0e17663854a37a7b3ad98fac3ba5d377 [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>
Tal Gitelman0c3b1892017-10-04 16:56:23 +030036 <!-- static configuration files -->
37 <fileset>
38 <directory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default</directory>
39 <followSymlinks>false</followSymlinks>
40 <includes>
Yuli Shlosberg0566f582017-11-26 19:05:23 +020041 <include>Artifact-Generator.properties</include>
42 <include>error-configuration.yaml</include>
43 <include>ecomp-error-configuration.yaml</include>
44 <include>logback.xml</include>
45 </includes>
46 </fileset>
Tal Gitelman0c3b1892017-10-04 16:56:23 +030047 <!-- BE WAR's -->
48 <fileset>
49 <directory>${project.parent.basedir}/sdc-os-chef/sdc-backend</directory>
50 <followSymlinks>false</followSymlinks>
51 <includes>
52 <include>*.war</include>
53 </includes>
54 </fileset>
55 <!-- FE WAR's -->
56 <fileset>
57 <directory>${project.parent.basedir}/sdc-os-chef/sdc-frontend/</directory>
58 <followSymlinks>false</followSymlinks>
59 <includes>
60 <include>*.war</include>
61 </includes>
62 </fileset>
63 <fileset>
64 <directory>${project.basedir}/sdc-backend/chef-repo/cookbooks/sdc-normatives/files/default</directory>
65 <followSymlinks>false</followSymlinks>
66 <includes>
67 <include>normatives.tar.gz</include>
68 </includes>
69 </fileset>
Yuli Shlosberg0566f582017-11-26 19:05:23 +020070 <fileset>
71 <directory>${project.basedir}/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/attributes/</directory>
72 <followSymlinks>false</followSymlinks>
73 <includes>
74 <include>**/default.rb</include>
75 </includes>
76 </fileset>
77 <fileset>
78 <directory>${project.basedir}/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/tools</directory>
79 <followSymlinks>false</followSymlinks>
80 </fileset>
Tal Gitelman15c2ce72017-10-18 19:47:40 +030081 <!-- Sanity jar -->
82 <fileset>
83 <directory>${project.basedir}/sdc-sanity</directory>
84 <followSymlinks>false</followSymlinks>
85 <includes>
86 <include>*.jar</include>
87 </includes>
88 </fileset>
89 <!-- Sanity test suites -->
90 <fileset>
91 <directory>${project.basedir}/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/testSuites</directory>
92 <followSymlinks>false</followSymlinks>
93 </fileset>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030094 </filesets>
95 </configuration>
96 </execution>
97 </executions>
98 </plugin>
99 <plugin>
100 <groupId>ru.yaal.maven</groupId>
101 <artifactId>write-text-files-maven-plugin</artifactId>
102 <version>1.1</version>
103 <configuration>
104 <charset>UTF-8</charset>
105 <files>
106 <file>
107 <path>
108 ${project.basedir}\sdc-cassandra\chef-repo\cookbooks\cassandra-actions\attributes\default.rb
109 </path>
110 <lines>
Yuli Shlosberg0566f582017-11-26 19:05:23 +0200111 <line>normal['version'] ="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"</line>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300112 </lines>
113 </file>
114 </files>
115 </configuration>
116 <executions>
117 <execution>
118 <id>write-text-files</id>
119 <phase>prepare-package</phase>
120 <goals>
121 <goal>write-text-files</goal>
122 </goals>
123 </execution>
124 </executions>
125 </plugin>
126 </plugins>
127 </build>
Michael Lando9dd269d2017-02-20 01:04:22 +0200128
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300129 <profiles>
130 <profile>
131 <id>docker-staging</id>
132 <properties>
133 <docker.tag>${project.version}-STAGING-${maven.build.timestamp}</docker.tag>
134 <docker.latest.tag>${project.version}-STAGING-latest</docker.latest.tag>
135 </properties>
136 </profile>
Michael Landoed64b5e2017-06-09 03:19:04 +0300137
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300138 <profile>
139 <id>docker</id>
140 <activation>
141 <activeByDefault>false</activeByDefault>
142 </activation>
143 <build>
144 <plugins>
145 <plugin>
146 <artifactId>maven-resources-plugin</artifactId>
147 <version>3.0.2</version>
148 <executions>
149 <execution>
150 <id>copy-resources-apidocs</id>
151 <phase>validate</phase>
152 <goals>
153 <goal>copy-resources</goal>
154 </goals>
155 <configuration>
156 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
157 <resources>
158 <resource>
159 <directory>
160 ${project.parent.basedir}/openecomp-be/tools/swagger-ui/api-docs
161 </directory>
162 <includes>
163 <include>api-docs.war</include>
164 </includes>
165 </resource>
166 </resources>
167 </configuration>
168 </execution>
Tal Gitelman004829c2017-09-10 20:06:45 +0300169
170 <execution>
171 <id>copy-static-configuration-files</id>
172 <phase>validate</phase>
173 <goals>
174 <goal>copy-resources</goal>
175 </goals>
176 <configuration>
177 <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default</outputDirectory>
178 <resources>
179 <resource>
180 <directory>${project.parent.basedir}/catalog-be/src/main/resources/config</directory>
181 <includes>
182 <include>Artifact-Generator.properties</include>
183 <include>error-configuration.yaml</include>
184 <include>ecomp-error-configuration.yaml</include>
185 <include>logback.xml</include>
186 </includes>
187 </resource>
188 </resources>
189 </configuration>
190 </execution>
191
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300192 <execution>
193 <id>copy-resources-be</id>
194 <phase>validate</phase>
195 <goals>
196 <goal>copy-resources</goal>
197 </goals>
198 <configuration>
199 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
200 <resources>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300201 <resource>
202 <directory>${project.parent.basedir}/catalog-be/target</directory>
203 <includes>
204 <include>catalog-be-${project.version}.war</include>
205 </includes>
206 </resource>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300207 <resource>
208 <directory>
209 ${project.parent.basedir}/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/target
210 </directory>
211 <includes>
212 <include>onboarding-be-${project.version}.war</include>
213 </includes>
214 </resource>
215 </resources>
216 </configuration>
217 </execution>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300218
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300219 <execution>
220 <id>copy-resources-fe</id>
221 <phase>validate</phase>
222 <goals>
223 <goal>copy-resources</goal>
224 </goals>
225 <configuration>
226 <outputDirectory>${basedir}/sdc-frontend</outputDirectory>
227 <resources>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300228 <resource>
229 <directory>${project.parent.basedir}/catalog-fe/target</directory>
230 <includes>
231 <include>catalog-fe-${project.version}.war</include>
232 </includes>
233 </resource>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300234 <resource>
235 <directory>${project.parent.basedir}/openecomp-ui/target</directory>
236 <includes>
237 <include>onboarding-fe-${project.version}.war</include>
238 </includes>
239 </resource>
240 </resources>
241 </configuration>
242 </execution>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300243
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300244 <execution>
245 <id>copy-tests-suites</id>
246 <phase>validate</phase>
247 <goals>
248 <goal>copy-resources</goal>
249 </goals>
250 <configuration>
251 <outputDirectory>sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/testSuites</outputDirectory>
252 <resources>
253 <resource>
254 <directory>${project.parent.basedir}/test-apis-ci/src/main/resources/ci/testSuites</directory>
255 <includes>
256 <include>*</include>
257 </includes>
258 </resource>
259 </resources>
260 </configuration>
261 </execution>
Yuli Shlosberg0566f582017-11-26 19:05:23 +0200262
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300263 <execution>
264 <id>copy-resources-test-apis-ci</id>
265 <phase>validate</phase>
266 <goals>
267 <goal>copy-resources</goal>
268 </goals>
269 <configuration>
270 <outputDirectory>${basedir}/sdc-sanity</outputDirectory>
271 <resources>
272 <resource>
273 <directory>${project.parent.basedir}/test-apis-ci/target</directory>
274 <includes>
275 <include>test-apis-ci-${project.version}-jar-with-dependencies.jar</include>
276 </includes>
277 </resource>
278 </resources>
279 </configuration>
280 </execution>
Yuli Shlosberg0566f582017-11-26 19:05:23 +0200281
282
283 <execution>
284 <id>copy-dox-files</id>
285 <phase>validate</phase>
286 <goals>
287 <goal>copy-resources</goal>
288 </goals>
289 <configuration>
290 <outputDirectory>${basedir}/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default</outputDirectory>
291 <resources>
292 <resource>
293 <directory>${project.parent.basedir}/openecomp-be</directory>
294 <includes>
295 <include>tools/build/**</include>
296 </includes>
297 </resource>
298 <resource>
299 <directory>${project.parent.basedir}/openecomp-be</directory>
300 <includes>
301 <include>tools/install/**</include>
302 </includes>
303 </resource>
304 </resources>
305 </configuration>
306 </execution>
307
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300308 <execution>
309 <id>copy-normatives</id>
310 <phase>validate</phase>
311 <goals>
312 <goal>copy-resources</goal>
313 </goals>
314 <configuration>
315 <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-normatives/files/default</outputDirectory>
316 <resources>
317 <resource>
318 <directory>${project.parent.basedir}/catalog-be/target</directory>
319 <includes>
320 <include>normatives.tar.gz</include>
321 </includes>
322 </resource>
323 </resources>
324 </configuration>
325 </execution>
Tal Gitelman51d50f02017-12-10 18:55:03 +0200326
327 <execution>
328 <id>copy-sdctool</id>
329 <phase>validate</phase>
330 <goals>
331 <goal>copy-resources</goal>
332 </goals>
333 <configuration>
334 <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default</outputDirectory>
335 <resources>
336 <resource>
337 <directory>${project.parent.basedir}/asdctool/target</directory>
338 <includes>
339 <include>sdctool.tar</include>
340 </includes>
341 </resource>
342 </resources>
343 </configuration>
344 </execution>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300345 </executions>
346 </plugin>
Tal Gitelman51d50f02017-12-10 18:55:03 +0200347
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300348 <plugin>
349 <groupId>io.fabric8</groupId>
350 <artifactId>docker-maven-plugin</artifactId>
Idan Amita63a1aa2017-11-08 11:25:03 +0200351 <version>0.23.0</version>
Michael Lando9dd269d2017-02-20 01:04:22 +0200352
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300353 <configuration>
354 <verbose>true</verbose>
355 <apiVersion>1.23</apiVersion>
Yuli Shlosberg44144952017-11-09 13:34:49 +0200356 <registry>nexus3.onap.org:10001</registry>
Idan Amit7cb00e62017-10-26 10:02:20 +0300357 <authConfig>
Idan Amitbc51da22017-10-26 16:56:53 +0300358 <pull>
Yuli Shlosberg0566f582017-11-26 19:05:23 +0200359 <username>docker</username>
360 <password>docker</password>
361 </pull>
362 </authConfig>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300363 <images>
Michael Lando9dd269d2017-02-20 01:04:22 +0200364
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300365 <!-- Build backend image -->
366 <image>
Idan Amit55dda1a2017-12-06 17:21:38 +0200367 <name>onap/sdc-backend</name>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300368 <alias>sdc-backend</alias>
369 <build>
370 <cleanup>try</cleanup>
371 <dockerFileDir>${project.basedir}/sdc-backend</dockerFileDir>
372 <tags>
373 <tag>${docker.tag}</tag>
Michael Lando3a875fb2017-09-23 18:37:09 +0300374 <tag>${docker.latest.tag}</tag>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300375 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
376 </tags>
377 </build>
378 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200379
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300380 <!-- Build frontend image -->
381 <image>
Idan Amit55dda1a2017-12-06 17:21:38 +0200382 <name>onap/sdc-frontend</name>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300383 <alias>sdc-frontend</alias>
384 <build>
385 <cleanup>try</cleanup>
386 <dockerFileDir>${project.basedir}/sdc-frontend</dockerFileDir>
387 <tags>
388 <tag>${docker.tag}</tag>
389 <tag>${docker.latest.tag}</tag>
390 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
391 </tags>
392 </build>
393 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200394
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300395 <!-- Build elastic search image -->
396 <image>
Idan Amit55dda1a2017-12-06 17:21:38 +0200397 <name>onap/sdc-elasticsearch</name>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300398 <alias>sdc-elasticsearch</alias>
399 <build>
400 <cleanup>try</cleanup>
401 <dockerFileDir>${project.basedir}/sdc-elasticsearch</dockerFileDir>
402 <tags>
403 <tag>${docker.tag}</tag>
404 <tag>${docker.latest.tag}</tag>
405 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
406 </tags>
407 </build>
408 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200409
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300410 <!-- Build kibana image -->
411 <image>
Idan Amit55dda1a2017-12-06 17:21:38 +0200412 <name>onap/sdc-kibana</name>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300413 <alias>sdc-kibana</alias>
414 <build>
415 <cleanup>try</cleanup>
416 <dockerFileDir>${project.basedir}/sdc-kibana</dockerFileDir>
417 <tags>
418 <tag>${docker.tag}</tag>
419 <tag>${docker.latest.tag}</tag>
420 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
421 </tags>
422 </build>
423 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200424
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300425 <!-- Build cassandra image -->
426 <image>
Idan Amit55dda1a2017-12-06 17:21:38 +0200427 <name>onap/sdc-cassandra</name>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300428 <alias>sdc-cassandra</alias>
429 <build>
430 <cleanup>try</cleanup>
431 <dockerFileDir>${project.basedir}/sdc-cassandra</dockerFileDir>
432 <tags>
433 <tag>${docker.tag}</tag>
434 <tag>${docker.latest.tag}</tag>
435 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
436 </tags>
437 </build>
438 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200439
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300440 <!-- Build sanity image -->
441 <image>
Idan Amit55dda1a2017-12-06 17:21:38 +0200442 <name>onap/sdc-sanity</name>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300443 <alias>sdc-sanity</alias>
444 <build>
445 <cleanup>try</cleanup>
446 <dockerFileDir>${project.basedir}/sdc-sanity</dockerFileDir>
447 <tags>
448 <tag>${docker.tag}</tag>
449 <tag>${docker.latest.tag}</tag>
Tal Gitelman15c2ce72017-10-18 19:47:40 +0300450 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300451 </tags>
452 </build>
453 </image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300454
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300455 </images>
456 </configuration>
457 <executions>
458 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300459 <id>clean-images</id>
460 <phase>pre-clean</phase>
461 <goals>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300462 <goal>remove</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300463 </goals>
464 <configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300465 <removeAll>true</removeAll>
Idan Amit55dda1a2017-12-06 17:21:38 +0200466 <image>onap/sdc-backend,onap/sdc-frontend,onap/sdc-elasticsearch,onap/sdc-kibana,onap/sdc-cassandra,onap/sdc-sanity</image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300467 </configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300468 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200469
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300470 <execution>
471 <id>generate-images</id>
472 <phase>package</phase>
473 <goals>
474 <goal>build</goal>
475 </goals>
476 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200477
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300478 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300479 <id>push-images</id>
480 <phase>deploy</phase>
481 <goals>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300482 <goal>push</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300483 </goals>
484 <configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300485 <image>
Idan Amit55dda1a2017-12-06 17:21:38 +0200486 onap/sdc-backend,onap/sdc-frontend,onap/sdc-elasticsearch,onap/sdc-kibana,onap/sdc-cassandra,onap/sdc-sanity</image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300487 </configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300488 </execution>
489 </executions>
490 </plugin>
491 </plugins>
492 </build>
493 </profile>
494 </profiles>
Michael Lando451a3402017-02-19 10:28:42 +0200495</project>