blob: a14dfc5ae145e4ac4c7668a7f6a50c5a88dc191d [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>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300326 </executions>
327 </plugin>
Michael Lando9dd269d2017-02-20 01:04:22 +0200328
329
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300330 <plugin>
331 <groupId>io.fabric8</groupId>
332 <artifactId>docker-maven-plugin</artifactId>
Idan Amita63a1aa2017-11-08 11:25:03 +0200333 <version>0.23.0</version>
Michael Lando9dd269d2017-02-20 01:04:22 +0200334
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300335 <configuration>
336 <verbose>true</verbose>
337 <apiVersion>1.23</apiVersion>
Yuli Shlosberg44144952017-11-09 13:34:49 +0200338 <registry>nexus3.onap.org:10001</registry>
Idan Amit7cb00e62017-10-26 10:02:20 +0300339 <authConfig>
Idan Amitbc51da22017-10-26 16:56:53 +0300340 <pull>
Yuli Shlosberg0566f582017-11-26 19:05:23 +0200341 <username>docker</username>
342 <password>docker</password>
343 </pull>
344 </authConfig>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300345 <images>
Michael Lando9dd269d2017-02-20 01:04:22 +0200346
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300347 <!-- Build backend image -->
348 <image>
349 <name>openecomp/sdc-backend</name>
350 <alias>sdc-backend</alias>
351 <build>
352 <cleanup>try</cleanup>
353 <dockerFileDir>${project.basedir}/sdc-backend</dockerFileDir>
354 <tags>
355 <tag>${docker.tag}</tag>
Michael Lando3a875fb2017-09-23 18:37:09 +0300356 <tag>${docker.latest.tag}</tag>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300357 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
358 </tags>
359 </build>
360 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200361
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300362 <!-- Build frontend image -->
363 <image>
364 <name>openecomp/sdc-frontend</name>
365 <alias>sdc-frontend</alias>
366 <build>
367 <cleanup>try</cleanup>
368 <dockerFileDir>${project.basedir}/sdc-frontend</dockerFileDir>
369 <tags>
370 <tag>${docker.tag}</tag>
371 <tag>${docker.latest.tag}</tag>
372 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
373 </tags>
374 </build>
375 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200376
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300377 <!-- Build elastic search image -->
378 <image>
379 <name>openecomp/sdc-elasticsearch</name>
380 <alias>sdc-elasticsearch</alias>
381 <build>
382 <cleanup>try</cleanup>
383 <dockerFileDir>${project.basedir}/sdc-elasticsearch</dockerFileDir>
384 <tags>
385 <tag>${docker.tag}</tag>
386 <tag>${docker.latest.tag}</tag>
387 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
388 </tags>
389 </build>
390 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200391
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300392 <!-- Build kibana image -->
393 <image>
394 <name>openecomp/sdc-kibana</name>
395 <alias>sdc-kibana</alias>
396 <build>
397 <cleanup>try</cleanup>
398 <dockerFileDir>${project.basedir}/sdc-kibana</dockerFileDir>
399 <tags>
400 <tag>${docker.tag}</tag>
401 <tag>${docker.latest.tag}</tag>
402 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
403 </tags>
404 </build>
405 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200406
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300407 <!-- Build cassandra image -->
408 <image>
409 <name>openecomp/sdc-cassandra</name>
410 <alias>sdc-cassandra</alias>
411 <build>
412 <cleanup>try</cleanup>
413 <dockerFileDir>${project.basedir}/sdc-cassandra</dockerFileDir>
414 <tags>
415 <tag>${docker.tag}</tag>
416 <tag>${docker.latest.tag}</tag>
417 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
418 </tags>
419 </build>
420 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200421
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300422 <!-- Build sanity image -->
423 <image>
424 <name>openecomp/sdc-sanity</name>
425 <alias>sdc-sanity</alias>
426 <build>
427 <cleanup>try</cleanup>
428 <dockerFileDir>${project.basedir}/sdc-sanity</dockerFileDir>
429 <tags>
430 <tag>${docker.tag}</tag>
431 <tag>${docker.latest.tag}</tag>
Tal Gitelman15c2ce72017-10-18 19:47:40 +0300432 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300433 </tags>
434 </build>
435 </image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300436
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300437 </images>
438 </configuration>
439 <executions>
440 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300441 <id>clean-images</id>
442 <phase>pre-clean</phase>
443 <goals>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300444 <goal>remove</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300445 </goals>
446 <configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300447 <removeAll>true</removeAll>
448 <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 +0300449 </configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300450 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200451
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300452 <execution>
453 <id>generate-images</id>
454 <phase>package</phase>
455 <goals>
456 <goal>build</goal>
457 </goals>
458 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200459
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300460 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300461 <id>push-images</id>
462 <phase>deploy</phase>
463 <goals>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300464 <goal>push</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300465 </goals>
466 <configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300467 <image>
468 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 +0300469 </configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300470 </execution>
471 </executions>
472 </plugin>
473 </plugins>
474 </build>
475 </profile>
476 </profiles>
Michael Lando451a3402017-02-19 10:28:42 +0200477</project>