blob: 41372d580128154c8e5a7ef20751813bd10e6fd9 [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>
Michael Lando451a3402017-02-19 10:28:42 +02007
Yuli Shlosberg9dde9262017-09-12 14:11:48 +03008 <parent>
9 <groupId>org.openecomp.sdc</groupId>
10 <artifactId>sdc-main</artifactId>
Michael Lando0ad3c802017-09-19 16:32:59 +030011 <version>1.2.0-SNAPSHOT</version>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030012 </parent>
Michael Lando451a3402017-02-19 10:28:42 +020013
Michael Landoed64b5e2017-06-09 03:19:04 +030014
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030015 <properties>
16 <docker.tag>${project.version}-${maven.build.timestamp}</docker.tag>
17 <docker.latest.tag>${project.version}-latest</docker.latest.tag>
18 </properties>
Michael Lando451a3402017-02-19 10:28:42 +020019
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030020 <build>
21 <plugins>
22 <plugin>
23 <artifactId>maven-clean-plugin</artifactId>
24 <version>3.0.0</version>
25 <executions>
26 <execution>
27 <id>clean.tosca.chef.os.folder</id>
28 <phase>clean</phase>
29 <goals>
30 <goal>clean</goal>
31 </goals>
32 <configuration>
33 <filesets>
34 <fileset>
35 <directory>
36 ${project.basedir}\sdc-cassandra\chef-repo\cookbooks\cassandra-actions\attributes\
37 </directory>
38 <followSymlinks>false</followSymlinks>
39 <includes>
40 <include>**/default.rb</include>
41 </includes>
42 </fileset>
Tal Gitelman004829c2017-09-10 20:06:45 +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 <includes>
47 <include>Artifact-Generator.properties</include>
48 <include>error-configuration.yaml</include>
49 <include>ecomp-error-configuration.yaml</include>
50 <include>logback.xml</include>
51 </includes>
52 </fileset>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030053 </filesets>
54 </configuration>
55 </execution>
56 </executions>
57 </plugin>
58 <plugin>
59 <groupId>ru.yaal.maven</groupId>
60 <artifactId>write-text-files-maven-plugin</artifactId>
61 <version>1.1</version>
62 <configuration>
63 <charset>UTF-8</charset>
64 <files>
65 <file>
66 <path>
67 ${project.basedir}\sdc-cassandra\chef-repo\cookbooks\cassandra-actions\attributes\default.rb
68 </path>
69 <lines>
70 <line>normal['version'] =
71 "${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"
72 </line>
73 </lines>
74 </file>
75 </files>
76 </configuration>
77 <executions>
78 <execution>
79 <id>write-text-files</id>
80 <phase>prepare-package</phase>
81 <goals>
82 <goal>write-text-files</goal>
83 </goals>
84 </execution>
85 </executions>
86 </plugin>
87 </plugins>
88 </build>
Michael Lando9dd269d2017-02-20 01:04:22 +020089
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030090 <profiles>
91 <profile>
92 <id>docker-staging</id>
93 <properties>
94 <docker.tag>${project.version}-STAGING-${maven.build.timestamp}</docker.tag>
95 <docker.latest.tag>${project.version}-STAGING-latest</docker.latest.tag>
96 </properties>
97 </profile>
Michael Landoed64b5e2017-06-09 03:19:04 +030098
Yuli Shlosberg9dde9262017-09-12 14:11:48 +030099 <profile>
100 <id>docker</id>
101 <activation>
102 <activeByDefault>false</activeByDefault>
103 </activation>
104 <build>
105 <plugins>
106 <plugin>
107 <artifactId>maven-resources-plugin</artifactId>
108 <version>3.0.2</version>
109 <executions>
110 <execution>
111 <id>copy-resources-apidocs</id>
112 <phase>validate</phase>
113 <goals>
114 <goal>copy-resources</goal>
115 </goals>
116 <configuration>
117 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
118 <resources>
119 <resource>
120 <directory>
121 ${project.parent.basedir}/openecomp-be/tools/swagger-ui/api-docs
122 </directory>
123 <includes>
124 <include>api-docs.war</include>
125 </includes>
126 </resource>
127 </resources>
128 </configuration>
129 </execution>
Tal Gitelman004829c2017-09-10 20:06:45 +0300130
131 <execution>
132 <id>copy-static-configuration-files</id>
133 <phase>validate</phase>
134 <goals>
135 <goal>copy-resources</goal>
136 </goals>
137 <configuration>
138 <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default</outputDirectory>
139 <resources>
140 <resource>
141 <directory>${project.parent.basedir}/catalog-be/src/main/resources/config</directory>
142 <includes>
143 <include>Artifact-Generator.properties</include>
144 <include>error-configuration.yaml</include>
145 <include>ecomp-error-configuration.yaml</include>
146 <include>logback.xml</include>
147 </includes>
148 </resource>
149 </resources>
150 </configuration>
151 </execution>
152
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300153 <execution>
154 <id>copy-resources-be</id>
155 <phase>validate</phase>
156 <goals>
157 <goal>copy-resources</goal>
158 </goals>
159 <configuration>
160 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
161 <resources>
162 <resource>
163 <directory>
164 ${project.parent.basedir}/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/target
165 </directory>
166 <includes>
167 <include>onboarding-be-${project.version}.war</include>
168 </includes>
169 </resource>
170 </resources>
171 </configuration>
172 </execution>
173 <execution>
174 <id>copy-resources-fe</id>
175 <phase>validate</phase>
176 <goals>
177 <goal>copy-resources</goal>
178 </goals>
179 <configuration>
180 <outputDirectory>${basedir}/sdc-frontend</outputDirectory>
181 <resources>
182 <resource>
183 <directory>${project.parent.basedir}/openecomp-ui/target</directory>
184 <includes>
185 <include>onboarding-fe-${project.version}.war</include>
186 </includes>
187 </resource>
188 </resources>
189 </configuration>
190 </execution>
191 <execution>
192 <id>copy-tests-suites</id>
193 <phase>validate</phase>
194 <goals>
195 <goal>copy-resources</goal>
196 </goals>
197 <configuration>
198 <outputDirectory>sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/testSuites</outputDirectory>
199 <resources>
200 <resource>
201 <directory>${project.parent.basedir}/test-apis-ci/src/main/resources/ci/testSuites</directory>
202 <includes>
203 <include>*</include>
204 </includes>
205 </resource>
206 </resources>
207 </configuration>
208 </execution>
209 <execution>
210 <id>copy-resources-test-apis-ci</id>
211 <phase>validate</phase>
212 <goals>
213 <goal>copy-resources</goal>
214 </goals>
215 <configuration>
216 <outputDirectory>${basedir}/sdc-sanity</outputDirectory>
217 <resources>
218 <resource>
219 <directory>${project.parent.basedir}/test-apis-ci/target</directory>
220 <includes>
221 <include>test-apis-ci-${project.version}-jar-with-dependencies.jar</include>
222 </includes>
223 </resource>
224 </resources>
225 </configuration>
226 </execution>
227 </executions>
228 </plugin>
Michael Lando9dd269d2017-02-20 01:04:22 +0200229
230
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300231 <plugin>
232 <groupId>io.fabric8</groupId>
233 <artifactId>docker-maven-plugin</artifactId>
234 <version>0.19.1</version>
Michael Lando9dd269d2017-02-20 01:04:22 +0200235
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300236 <configuration>
237 <verbose>true</verbose>
238 <apiVersion>1.23</apiVersion>
Areli Fuss7d2c6052017-09-25 18:24:04 +0300239 <registry>nexus3.onap.org:10003</registry>
Michael Lando9dd269d2017-02-20 01:04:22 +0200240
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300241 <images>
Michael Lando9dd269d2017-02-20 01:04:22 +0200242
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300243 <!-- Build backend image -->
244 <image>
245 <name>openecomp/sdc-backend</name>
246 <alias>sdc-backend</alias>
247 <build>
248 <cleanup>try</cleanup>
249 <dockerFileDir>${project.basedir}/sdc-backend</dockerFileDir>
250 <tags>
251 <tag>${docker.tag}</tag>
Michael Lando3a875fb2017-09-23 18:37:09 +0300252 <tag>${docker.latest.tag}</tag>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300253 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
254 </tags>
255 </build>
256 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200257
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300258 <!-- Build frontend image -->
259 <image>
260 <name>openecomp/sdc-frontend</name>
261 <alias>sdc-frontend</alias>
262 <build>
263 <cleanup>try</cleanup>
264 <dockerFileDir>${project.basedir}/sdc-frontend</dockerFileDir>
265 <tags>
266 <tag>${docker.tag}</tag>
267 <tag>${docker.latest.tag}</tag>
268 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
269 </tags>
270 </build>
271 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200272
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300273 <!-- Build elastic search image -->
274 <image>
275 <name>openecomp/sdc-elasticsearch</name>
276 <alias>sdc-elasticsearch</alias>
277 <build>
278 <cleanup>try</cleanup>
279 <dockerFileDir>${project.basedir}/sdc-elasticsearch</dockerFileDir>
280 <tags>
281 <tag>${docker.tag}</tag>
282 <tag>${docker.latest.tag}</tag>
283 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
284 </tags>
285 </build>
286 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200287
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300288 <!-- Build kibana image -->
289 <image>
290 <name>openecomp/sdc-kibana</name>
291 <alias>sdc-kibana</alias>
292 <build>
293 <cleanup>try</cleanup>
294 <dockerFileDir>${project.basedir}/sdc-kibana</dockerFileDir>
295 <tags>
296 <tag>${docker.tag}</tag>
297 <tag>${docker.latest.tag}</tag>
298 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
299 </tags>
300 </build>
301 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200302
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300303 <!-- Build cassandra image -->
304 <image>
305 <name>openecomp/sdc-cassandra</name>
306 <alias>sdc-cassandra</alias>
307 <build>
308 <cleanup>try</cleanup>
309 <dockerFileDir>${project.basedir}/sdc-cassandra</dockerFileDir>
310 <tags>
311 <tag>${docker.tag}</tag>
312 <tag>${docker.latest.tag}</tag>
313 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
314 </tags>
315 </build>
316 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200317
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300318 <!-- Build sanity image -->
319 <image>
320 <name>openecomp/sdc-sanity</name>
321 <alias>sdc-sanity</alias>
322 <build>
323 <cleanup>try</cleanup>
324 <dockerFileDir>${project.basedir}/sdc-sanity</dockerFileDir>
325 <tags>
326 <tag>${docker.tag}</tag>
327 <tag>${docker.latest.tag}</tag>
328 <tag>1.1-STAGING-latest</tag>
329 </tags>
330 </build>
331 </image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300332
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300333 </images>
334 </configuration>
335 <executions>
336 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300337 <id>clean-images</id>
338 <phase>pre-clean</phase>
339 <goals>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300340 <goal>remove</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300341 </goals>
342 <configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300343 <removeAll>true</removeAll>
344 <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 +0300345 </configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300346 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200347
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300348 <execution>
349 <id>generate-images</id>
350 <phase>package</phase>
351 <goals>
352 <goal>build</goal>
353 </goals>
354 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200355
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300356 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300357 <id>push-images</id>
358 <phase>deploy</phase>
359 <goals>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300360 <goal>build</goal>
361 <goal>push</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300362 </goals>
363 <configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300364 <image>
365 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 +0300366 </configuration>
Yuli Shlosberg9dde9262017-09-12 14:11:48 +0300367 </execution>
368 </executions>
369 </plugin>
370 </plugins>
371 </build>
372 </profile>
373 </profiles>
Michael Lando451a3402017-02-19 10:28:42 +0200374</project>