blob: a4c80362147938ec377b188a72797eabbf0efc4c [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>
77
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030078 </filesets>
79 </configuration>
80 </execution>
81 </executions>
82 </plugin>
83 <plugin>
84 <groupId>ru.yaal.maven</groupId>
85 <artifactId>write-text-files-maven-plugin</artifactId>
86 <version>1.1</version>
87 <configuration>
88 <charset>UTF-8</charset>
89 <files>
90 <file>
91 <path>
92 ${project.basedir}\sdc-cassandra\chef-repo\cookbooks\cassandra-actions\attributes\default.rb
93 </path>
94 <lines>
Tal Gitelmanedfe0df2017-10-03 20:39:02 +030095 <line>normal['version'] = "${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"</line>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030096 </lines>
97 </file>
98 </files>
99 </configuration>
100 <executions>
101 <execution>
102 <id>write-text-files</id>
103 <phase>prepare-package</phase>
104 <goals>
105 <goal>write-text-files</goal>
106 </goals>
107 </execution>
108 </executions>
109 </plugin>
110 </plugins>
111 </build>
Michael Lando9dd269d2017-02-20 01:04:22 +0200112
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300113 <profiles>
114 <profile>
115 <id>docker-staging</id>
116 <properties>
117 <docker.tag>${project.version}-STAGING-${maven.build.timestamp}</docker.tag>
118 <docker.latest.tag>${project.version}-STAGING-latest</docker.latest.tag>
119 </properties>
120 </profile>
Michael Landoed64b5e2017-06-09 03:19:04 +0300121
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300122 <profile>
123 <id>docker</id>
124 <activation>
125 <activeByDefault>false</activeByDefault>
126 </activation>
127 <build>
128 <plugins>
129 <plugin>
130 <artifactId>maven-resources-plugin</artifactId>
131 <version>3.0.2</version>
132 <executions>
133 <execution>
134 <id>copy-resources-apidocs</id>
135 <phase>validate</phase>
136 <goals>
137 <goal>copy-resources</goal>
138 </goals>
139 <configuration>
140 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
141 <resources>
142 <resource>
143 <directory>
144 ${project.parent.basedir}/openecomp-be/tools/swagger-ui/api-docs
145 </directory>
146 <includes>
147 <include>api-docs.war</include>
148 </includes>
149 </resource>
150 </resources>
151 </configuration>
152 </execution>
Tal Gitelman004829c2017-09-10 20:06:45 +0300153
154 <execution>
155 <id>copy-static-configuration-files</id>
156 <phase>validate</phase>
157 <goals>
158 <goal>copy-resources</goal>
159 </goals>
160 <configuration>
161 <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default</outputDirectory>
162 <resources>
163 <resource>
164 <directory>${project.parent.basedir}/catalog-be/src/main/resources/config</directory>
165 <includes>
166 <include>Artifact-Generator.properties</include>
167 <include>error-configuration.yaml</include>
168 <include>ecomp-error-configuration.yaml</include>
169 <include>logback.xml</include>
170 </includes>
171 </resource>
172 </resources>
173 </configuration>
174 </execution>
175
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300176 <execution>
177 <id>copy-resources-be</id>
178 <phase>validate</phase>
179 <goals>
180 <goal>copy-resources</goal>
181 </goals>
182 <configuration>
183 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
184 <resources>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300185 <resource>
186 <directory>${project.parent.basedir}/catalog-be/target</directory>
187 <includes>
188 <include>catalog-be-${project.version}.war</include>
189 </includes>
190 </resource>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300191 <resource>
192 <directory>
193 ${project.parent.basedir}/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/target
194 </directory>
195 <includes>
196 <include>onboarding-be-${project.version}.war</include>
197 </includes>
198 </resource>
199 </resources>
200 </configuration>
201 </execution>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300202
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300203 <execution>
204 <id>copy-resources-fe</id>
205 <phase>validate</phase>
206 <goals>
207 <goal>copy-resources</goal>
208 </goals>
209 <configuration>
210 <outputDirectory>${basedir}/sdc-frontend</outputDirectory>
211 <resources>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300212 <resource>
213 <directory>${project.parent.basedir}/catalog-fe/target</directory>
214 <includes>
215 <include>catalog-fe-${project.version}.war</include>
216 </includes>
217 </resource>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300218 <resource>
219 <directory>${project.parent.basedir}/openecomp-ui/target</directory>
220 <includes>
221 <include>onboarding-fe-${project.version}.war</include>
222 </includes>
223 </resource>
224 </resources>
225 </configuration>
226 </execution>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300227
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300228 <execution>
229 <id>copy-tests-suites</id>
230 <phase>validate</phase>
231 <goals>
232 <goal>copy-resources</goal>
233 </goals>
234 <configuration>
235 <outputDirectory>sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/testSuites</outputDirectory>
236 <resources>
237 <resource>
238 <directory>${project.parent.basedir}/test-apis-ci/src/main/resources/ci/testSuites</directory>
239 <includes>
240 <include>*</include>
241 </includes>
242 </resource>
243 </resources>
244 </configuration>
245 </execution>
246 <execution>
247 <id>copy-resources-test-apis-ci</id>
248 <phase>validate</phase>
249 <goals>
250 <goal>copy-resources</goal>
251 </goals>
252 <configuration>
253 <outputDirectory>${basedir}/sdc-sanity</outputDirectory>
254 <resources>
255 <resource>
256 <directory>${project.parent.basedir}/test-apis-ci/target</directory>
257 <includes>
258 <include>test-apis-ci-${project.version}-jar-with-dependencies.jar</include>
259 </includes>
260 </resource>
261 </resources>
262 </configuration>
263 </execution>
Tal Gitelman0c3b1892017-10-04 16:56:23 +0300264 <execution>
265 <id>copy-normatives</id>
266 <phase>validate</phase>
267 <goals>
268 <goal>copy-resources</goal>
269 </goals>
270 <configuration>
271 <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-normatives/files/default</outputDirectory>
272 <resources>
273 <resource>
274 <directory>${project.parent.basedir}/catalog-be/target</directory>
275 <includes>
276 <include>normatives.tar.gz</include>
277 </includes>
278 </resource>
279 </resources>
280 </configuration>
281 </execution>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300282 </executions>
283 </plugin>
Michael Lando9dd269d2017-02-20 01:04:22 +0200284
285
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300286 <plugin>
287 <groupId>io.fabric8</groupId>
288 <artifactId>docker-maven-plugin</artifactId>
289 <version>0.19.1</version>
Michael Lando9dd269d2017-02-20 01:04:22 +0200290
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300291 <configuration>
292 <verbose>true</verbose>
293 <apiVersion>1.23</apiVersion>
Areli Fuss7d2c6052017-09-25 18:24:04 +0300294 <registry>nexus3.onap.org:10003</registry>
Michael Lando9dd269d2017-02-20 01:04:22 +0200295
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300296 <images>
Michael Lando9dd269d2017-02-20 01:04:22 +0200297
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300298 <!-- Build backend image -->
299 <image>
300 <name>openecomp/sdc-backend</name>
301 <alias>sdc-backend</alias>
302 <build>
303 <cleanup>try</cleanup>
304 <dockerFileDir>${project.basedir}/sdc-backend</dockerFileDir>
305 <tags>
306 <tag>${docker.tag}</tag>
Michael Lando3a875fb2017-09-23 18:37:09 +0300307 <tag>${docker.latest.tag}</tag>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300308 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
309 </tags>
310 </build>
311 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200312
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300313 <!-- Build frontend image -->
314 <image>
315 <name>openecomp/sdc-frontend</name>
316 <alias>sdc-frontend</alias>
317 <build>
318 <cleanup>try</cleanup>
319 <dockerFileDir>${project.basedir}/sdc-frontend</dockerFileDir>
320 <tags>
321 <tag>${docker.tag}</tag>
322 <tag>${docker.latest.tag}</tag>
323 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
324 </tags>
325 </build>
326 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200327
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300328 <!-- Build elastic search image -->
329 <image>
330 <name>openecomp/sdc-elasticsearch</name>
331 <alias>sdc-elasticsearch</alias>
332 <build>
333 <cleanup>try</cleanup>
334 <dockerFileDir>${project.basedir}/sdc-elasticsearch</dockerFileDir>
335 <tags>
336 <tag>${docker.tag}</tag>
337 <tag>${docker.latest.tag}</tag>
338 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
339 </tags>
340 </build>
341 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200342
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300343 <!-- Build kibana image -->
344 <image>
345 <name>openecomp/sdc-kibana</name>
346 <alias>sdc-kibana</alias>
347 <build>
348 <cleanup>try</cleanup>
349 <dockerFileDir>${project.basedir}/sdc-kibana</dockerFileDir>
350 <tags>
351 <tag>${docker.tag}</tag>
352 <tag>${docker.latest.tag}</tag>
353 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
354 </tags>
355 </build>
356 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200357
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300358 <!-- Build cassandra image -->
359 <image>
360 <name>openecomp/sdc-cassandra</name>
361 <alias>sdc-cassandra</alias>
362 <build>
363 <cleanup>try</cleanup>
364 <dockerFileDir>${project.basedir}/sdc-cassandra</dockerFileDir>
365 <tags>
366 <tag>${docker.tag}</tag>
367 <tag>${docker.latest.tag}</tag>
368 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
369 </tags>
370 </build>
371 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200372
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300373 <!-- Build sanity image -->
374 <image>
375 <name>openecomp/sdc-sanity</name>
376 <alias>sdc-sanity</alias>
377 <build>
378 <cleanup>try</cleanup>
379 <dockerFileDir>${project.basedir}/sdc-sanity</dockerFileDir>
380 <tags>
381 <tag>${docker.tag}</tag>
382 <tag>${docker.latest.tag}</tag>
383 <tag>1.1-STAGING-latest</tag>
384 </tags>
385 </build>
386 </image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300387
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300388 </images>
389 </configuration>
390 <executions>
391 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300392 <id>clean-images</id>
393 <phase>pre-clean</phase>
394 <goals>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300395 <goal>remove</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300396 </goals>
397 <configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300398 <removeAll>true</removeAll>
399 <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 +0300400 </configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300401 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200402
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300403 <execution>
404 <id>generate-images</id>
405 <phase>package</phase>
406 <goals>
407 <goal>build</goal>
408 </goals>
409 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200410
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300411 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300412 <id>push-images</id>
413 <phase>deploy</phase>
414 <goals>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300415 <goal>build</goal>
416 <goal>push</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300417 </goals>
418 <configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300419 <image>
420 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 +0300421 </configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300422 </execution>
423 </executions>
424 </plugin>
425 </plugins>
426 </build>
427 </profile>
428 </profiles>
Michael Lando451a3402017-02-19 10:28:42 +0200429</project>