blob: f27a9434fac921be7ba21a92f2ef014b8ff1166b [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>
Michael Landod4bf8d62017-12-24 20:23:35 +020019 <docker.latest.tag>${project.version}-latest</docker.latest.tag>
20 <sonar.skip>true</sonar.skip>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030021 </properties>
Michael Lando451a3402017-02-19 10:28:42 +020022
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030023 <build>
24 <plugins>
25 <plugin>
26 <artifactId>maven-clean-plugin</artifactId>
27 <version>3.0.0</version>
28 <executions>
29 <execution>
30 <id>clean.tosca.chef.os.folder</id>
31 <phase>clean</phase>
32 <goals>
33 <goal>clean</goal>
34 </goals>
35 <configuration>
36 <filesets>
Tal Gitelman0c3b1892017-10-04 16:56:23 +030037 <!-- static configuration files -->
38 <fileset>
39 <directory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default</directory>
40 <followSymlinks>false</followSymlinks>
41 <includes>
Yuli Shlosberg0566f582017-11-26 19:05:23 +020042 <include>Artifact-Generator.properties</include>
43 <include>error-configuration.yaml</include>
44 <include>ecomp-error-configuration.yaml</include>
45 <include>logback.xml</include>
46 </includes>
47 </fileset>
Tal Gitelman0c3b1892017-10-04 16:56:23 +030048 <!-- BE WAR's -->
49 <fileset>
50 <directory>${project.parent.basedir}/sdc-os-chef/sdc-backend</directory>
51 <followSymlinks>false</followSymlinks>
52 <includes>
53 <include>*.war</include>
54 </includes>
55 </fileset>
56 <!-- FE WAR's -->
57 <fileset>
58 <directory>${project.parent.basedir}/sdc-os-chef/sdc-frontend/</directory>
59 <followSymlinks>false</followSymlinks>
60 <includes>
61 <include>*.war</include>
62 </includes>
63 </fileset>
64 <fileset>
65 <directory>${project.basedir}/sdc-backend/chef-repo/cookbooks/sdc-normatives/files/default</directory>
66 <followSymlinks>false</followSymlinks>
67 <includes>
68 <include>normatives.tar.gz</include>
69 </includes>
70 </fileset>
Yuli Shlosberg0566f582017-11-26 19:05:23 +020071 <fileset>
72 <directory>${project.basedir}/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/attributes/</directory>
73 <followSymlinks>false</followSymlinks>
74 <includes>
75 <include>**/default.rb</include>
76 </includes>
77 </fileset>
78 <fileset>
79 <directory>${project.basedir}/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/tools</directory>
80 <followSymlinks>false</followSymlinks>
81 </fileset>
Tal Gitelman15c2ce72017-10-18 19:47:40 +030082 <!-- Sanity jar -->
83 <fileset>
84 <directory>${project.basedir}/sdc-sanity</directory>
85 <followSymlinks>false</followSymlinks>
86 <includes>
87 <include>*.jar</include>
88 </includes>
89 </fileset>
90 <!-- Sanity test suites -->
91 <fileset>
92 <directory>${project.basedir}/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/testSuites</directory>
93 <followSymlinks>false</followSymlinks>
94 </fileset>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030095 </filesets>
96 </configuration>
97 </execution>
98 </executions>
99 </plugin>
100 <plugin>
101 <groupId>ru.yaal.maven</groupId>
102 <artifactId>write-text-files-maven-plugin</artifactId>
103 <version>1.1</version>
104 <configuration>
105 <charset>UTF-8</charset>
106 <files>
107 <file>
108 <path>
109 ${project.basedir}\sdc-cassandra\chef-repo\cookbooks\cassandra-actions\attributes\default.rb
110 </path>
111 <lines>
Yuli Shlosberg0566f582017-11-26 19:05:23 +0200112 <line>normal['version'] ="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"</line>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300113 </lines>
114 </file>
115 </files>
116 </configuration>
117 <executions>
118 <execution>
119 <id>write-text-files</id>
120 <phase>prepare-package</phase>
121 <goals>
122 <goal>write-text-files</goal>
123 </goals>
124 </execution>
125 </executions>
126 </plugin>
127 </plugins>
128 </build>
Michael Lando9dd269d2017-02-20 01:04:22 +0200129
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300130 <profiles>
131 <profile>
132 <id>docker-staging</id>
133 <properties>
134 <docker.tag>${project.version}-STAGING-${maven.build.timestamp}</docker.tag>
135 <docker.latest.tag>${project.version}-STAGING-latest</docker.latest.tag>
136 </properties>
137 </profile>
Michael Landoed64b5e2017-06-09 03:19:04 +0300138
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300139 <profile>
140 <id>docker</id>
141 <activation>
142 <activeByDefault>false</activeByDefault>
143 </activation>
144 <build>
145 <plugins>
146 <plugin>
147 <artifactId>maven-resources-plugin</artifactId>
148 <version>3.0.2</version>
149 <executions>
150 <execution>
151 <id>copy-resources-apidocs</id>
152 <phase>validate</phase>
153 <goals>
154 <goal>copy-resources</goal>
155 </goals>
156 <configuration>
157 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
158 <resources>
159 <resource>
160 <directory>
161 ${project.parent.basedir}/openecomp-be/tools/swagger-ui/api-docs
162 </directory>
163 <includes>
164 <include>api-docs.war</include>
165 </includes>
166 </resource>
167 </resources>
168 </configuration>
169 </execution>
Tal Gitelman004829c2017-09-10 20:06:45 +0300170
171 <execution>
172 <id>copy-static-configuration-files</id>
173 <phase>validate</phase>
174 <goals>
175 <goal>copy-resources</goal>
176 </goals>
177 <configuration>
178 <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default</outputDirectory>
179 <resources>
180 <resource>
181 <directory>${project.parent.basedir}/catalog-be/src/main/resources/config</directory>
182 <includes>
183 <include>Artifact-Generator.properties</include>
184 <include>error-configuration.yaml</include>
185 <include>ecomp-error-configuration.yaml</include>
186 <include>logback.xml</include>
187 </includes>
188 </resource>
189 </resources>
190 </configuration>
191 </execution>
192
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300193 <execution>
194 <id>copy-resources-be</id>
195 <phase>validate</phase>
196 <goals>
197 <goal>copy-resources</goal>
198 </goals>
199 <configuration>
200 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
201 <resources>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300202 <resource>
203 <directory>${project.parent.basedir}/catalog-be/target</directory>
204 <includes>
205 <include>catalog-be-${project.version}.war</include>
206 </includes>
207 </resource>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300208 <resource>
209 <directory>
210 ${project.parent.basedir}/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/target
211 </directory>
212 <includes>
213 <include>onboarding-be-${project.version}.war</include>
214 </includes>
215 </resource>
216 </resources>
217 </configuration>
218 </execution>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300219
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300220 <execution>
221 <id>copy-resources-fe</id>
222 <phase>validate</phase>
223 <goals>
224 <goal>copy-resources</goal>
225 </goals>
226 <configuration>
227 <outputDirectory>${basedir}/sdc-frontend</outputDirectory>
228 <resources>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300229 <resource>
230 <directory>${project.parent.basedir}/catalog-fe/target</directory>
231 <includes>
232 <include>catalog-fe-${project.version}.war</include>
233 </includes>
234 </resource>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300235 <resource>
236 <directory>${project.parent.basedir}/openecomp-ui/target</directory>
237 <includes>
238 <include>onboarding-fe-${project.version}.war</include>
239 </includes>
240 </resource>
241 </resources>
242 </configuration>
243 </execution>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300244
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300245 <execution>
246 <id>copy-tests-suites</id>
247 <phase>validate</phase>
248 <goals>
249 <goal>copy-resources</goal>
250 </goals>
251 <configuration>
252 <outputDirectory>sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/testSuites</outputDirectory>
253 <resources>
254 <resource>
255 <directory>${project.parent.basedir}/test-apis-ci/src/main/resources/ci/testSuites</directory>
256 <includes>
257 <include>*</include>
258 </includes>
259 </resource>
260 </resources>
261 </configuration>
262 </execution>
Yuli Shlosberg0566f582017-11-26 19:05:23 +0200263
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300264 <execution>
265 <id>copy-resources-test-apis-ci</id>
266 <phase>validate</phase>
267 <goals>
268 <goal>copy-resources</goal>
269 </goals>
270 <configuration>
271 <outputDirectory>${basedir}/sdc-sanity</outputDirectory>
272 <resources>
273 <resource>
274 <directory>${project.parent.basedir}/test-apis-ci/target</directory>
275 <includes>
276 <include>test-apis-ci-${project.version}-jar-with-dependencies.jar</include>
277 </includes>
278 </resource>
279 </resources>
280 </configuration>
281 </execution>
Yuli Shlosberg0566f582017-11-26 19:05:23 +0200282
283
284 <execution>
285 <id>copy-dox-files</id>
286 <phase>validate</phase>
287 <goals>
288 <goal>copy-resources</goal>
289 </goals>
290 <configuration>
291 <outputDirectory>${basedir}/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default</outputDirectory>
292 <resources>
293 <resource>
294 <directory>${project.parent.basedir}/openecomp-be</directory>
295 <includes>
296 <include>tools/build/**</include>
297 </includes>
298 </resource>
299 <resource>
300 <directory>${project.parent.basedir}/openecomp-be</directory>
301 <includes>
302 <include>tools/install/**</include>
303 </includes>
304 </resource>
305 </resources>
306 </configuration>
307 </execution>
308
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300309 <execution>
310 <id>copy-normatives</id>
311 <phase>validate</phase>
312 <goals>
313 <goal>copy-resources</goal>
314 </goals>
315 <configuration>
316 <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-normatives/files/default</outputDirectory>
317 <resources>
318 <resource>
319 <directory>${project.parent.basedir}/catalog-be/target</directory>
320 <includes>
321 <include>normatives.tar.gz</include>
322 </includes>
323 </resource>
324 </resources>
325 </configuration>
326 </execution>
Tal Gitelman51d50f02017-12-10 18:55:03 +0200327
328 <execution>
329 <id>copy-sdctool</id>
330 <phase>validate</phase>
331 <goals>
332 <goal>copy-resources</goal>
333 </goals>
334 <configuration>
335 <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default</outputDirectory>
336 <resources>
337 <resource>
338 <directory>${project.parent.basedir}/asdctool/target</directory>
339 <includes>
340 <include>sdctool.tar</include>
341 </includes>
342 </resource>
343 </resources>
344 </configuration>
345 </execution>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300346 </executions>
347 </plugin>
Tal Gitelman51d50f02017-12-10 18:55:03 +0200348
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300349 <plugin>
350 <groupId>io.fabric8</groupId>
351 <artifactId>docker-maven-plugin</artifactId>
Idan Amita63a1aa2017-11-08 11:25:03 +0200352 <version>0.23.0</version>
Michael Lando9dd269d2017-02-20 01:04:22 +0200353
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300354 <configuration>
355 <verbose>true</verbose>
356 <apiVersion>1.23</apiVersion>
Yuli Shlosberg44144952017-11-09 13:34:49 +0200357 <registry>nexus3.onap.org:10001</registry>
Idan Amit7cb00e62017-10-26 10:02:20 +0300358 <authConfig>
Idan Amitbc51da22017-10-26 16:56:53 +0300359 <pull>
Yuli Shlosberg0566f582017-11-26 19:05:23 +0200360 <username>docker</username>
361 <password>docker</password>
362 </pull>
363 </authConfig>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300364 <images>
Michael Lando9dd269d2017-02-20 01:04:22 +0200365
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300366 <!-- Build backend image -->
367 <image>
Idan Amit55dda1a2017-12-06 17:21:38 +0200368 <name>onap/sdc-backend</name>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300369 <alias>sdc-backend</alias>
370 <build>
371 <cleanup>try</cleanup>
372 <dockerFileDir>${project.basedir}/sdc-backend</dockerFileDir>
373 <tags>
374 <tag>${docker.tag}</tag>
Michael Lando3a875fb2017-09-23 18:37:09 +0300375 <tag>${docker.latest.tag}</tag>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300376 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
377 </tags>
378 </build>
379 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200380
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300381 <!-- Build frontend image -->
382 <image>
Idan Amit55dda1a2017-12-06 17:21:38 +0200383 <name>onap/sdc-frontend</name>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300384 <alias>sdc-frontend</alias>
385 <build>
386 <cleanup>try</cleanup>
387 <dockerFileDir>${project.basedir}/sdc-frontend</dockerFileDir>
388 <tags>
389 <tag>${docker.tag}</tag>
390 <tag>${docker.latest.tag}</tag>
391 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
392 </tags>
393 </build>
394 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200395
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300396 <!-- Build elastic search image -->
397 <image>
Idan Amit55dda1a2017-12-06 17:21:38 +0200398 <name>onap/sdc-elasticsearch</name>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300399 <alias>sdc-elasticsearch</alias>
400 <build>
401 <cleanup>try</cleanup>
402 <dockerFileDir>${project.basedir}/sdc-elasticsearch</dockerFileDir>
403 <tags>
404 <tag>${docker.tag}</tag>
405 <tag>${docker.latest.tag}</tag>
406 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
407 </tags>
408 </build>
409 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200410
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300411 <!-- Build kibana image -->
412 <image>
Idan Amit55dda1a2017-12-06 17:21:38 +0200413 <name>onap/sdc-kibana</name>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300414 <alias>sdc-kibana</alias>
415 <build>
416 <cleanup>try</cleanup>
417 <dockerFileDir>${project.basedir}/sdc-kibana</dockerFileDir>
418 <tags>
419 <tag>${docker.tag}</tag>
420 <tag>${docker.latest.tag}</tag>
421 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
422 </tags>
423 </build>
424 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200425
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300426 <!-- Build cassandra image -->
427 <image>
Idan Amit55dda1a2017-12-06 17:21:38 +0200428 <name>onap/sdc-cassandra</name>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300429 <alias>sdc-cassandra</alias>
430 <build>
431 <cleanup>try</cleanup>
432 <dockerFileDir>${project.basedir}/sdc-cassandra</dockerFileDir>
433 <tags>
434 <tag>${docker.tag}</tag>
435 <tag>${docker.latest.tag}</tag>
436 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
437 </tags>
438 </build>
439 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200440
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300441 <!-- Build sanity image -->
442 <image>
Idan Amit55dda1a2017-12-06 17:21:38 +0200443 <name>onap/sdc-sanity</name>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300444 <alias>sdc-sanity</alias>
445 <build>
446 <cleanup>try</cleanup>
447 <dockerFileDir>${project.basedir}/sdc-sanity</dockerFileDir>
448 <tags>
449 <tag>${docker.tag}</tag>
450 <tag>${docker.latest.tag}</tag>
Tal Gitelman15c2ce72017-10-18 19:47:40 +0300451 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300452 </tags>
453 </build>
454 </image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300455
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300456 </images>
457 </configuration>
458 <executions>
459 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300460 <id>clean-images</id>
461 <phase>pre-clean</phase>
462 <goals>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300463 <goal>remove</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300464 </goals>
465 <configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300466 <removeAll>true</removeAll>
Idan Amit55dda1a2017-12-06 17:21:38 +0200467 <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 +0300468 </configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300469 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200470
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300471 <execution>
472 <id>generate-images</id>
473 <phase>package</phase>
474 <goals>
475 <goal>build</goal>
476 </goals>
477 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200478
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300479 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300480 <id>push-images</id>
481 <phase>deploy</phase>
482 <goals>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300483 <goal>push</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300484 </goals>
485 <configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300486 <image>
Idan Amit55dda1a2017-12-06 17:21:38 +0200487 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 +0300488 </configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300489 </execution>
490 </executions>
491 </plugin>
492 </plugins>
493 </build>
494 </profile>
495 </profiles>
Michael Lando451a3402017-02-19 10:28:42 +0200496</project>