blob: f7e1eaca784363ac55d005e2ebc96bfde173555f [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"
Michael Landoed64b5e2017-06-09 03:19:04 +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
4 <modelVersion>4.0.0</modelVersion>
5
6 <artifactId>sdc-os-chef</artifactId>
7
8 <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>
Michael Lando451a3402017-02-19 10:28:42 +020012 </parent>
13
Michael Landoed64b5e2017-06-09 03:19:04 +030014
ig6133142d2e62017-04-02 17:14:00 +030015 <properties>
ig6133538b8262017-04-06 12:50:11 +030016 <docker.tag>${project.version}-${maven.build.timestamp}</docker.tag>
17 <docker.latest.tag>${project.version}-latest</docker.latest.tag>
ig6133142d2e62017-04-02 17:14:00 +030018 </properties>
Michael Lando451a3402017-02-19 10:28:42 +020019
Michael Lando9dd269d2017-02-20 01:04:22 +020020 <build>
21 <plugins>
22 <plugin>
Michael Lando2d3e1cb2017-07-25 22:53:44 +030023 <artifactId>maven-clean-plugin</artifactId>
24 <version>3.0.0</version>
Michael Lando9dd269d2017-02-20 01:04:22 +020025 <executions>
26 <execution>
Michael Lando2d3e1cb2017-07-25 22:53:44 +030027 <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>${project.basedir}\sdc-cassandra\chef-repo\cookbooks\cassandra-actions\attributes\</directory>
36 <followSymlinks>false</followSymlinks>
37 <includes>
38 <include>**/default.rb</include>
39 </includes>
40 </fileset>
Tal Gitelman004829c2017-09-10 20:06:45 +030041 <!-- static configuration files -->
42 <fileset>
43 <directory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default</directory>
44 <includes>
45 <include>Artifact-Generator.properties</include>
46 <include>error-configuration.yaml</include>
47 <include>ecomp-error-configuration.yaml</include>
48 <include>logback.xml</include>
49 </includes>
50 </fileset>
Michael Lando2d3e1cb2017-07-25 22:53:44 +030051 </filesets>
52 </configuration>
53 </execution>
54 </executions>
55 </plugin>
56 <plugin>
57 <groupId>ru.yaal.maven</groupId>
58 <artifactId>write-text-files-maven-plugin</artifactId>
59 <version>1.1</version>
60 <configuration>
61 <charset>UTF-8</charset>
62 <files>
63 <file>
64 <path>${project.basedir}\sdc-cassandra\chef-repo\cookbooks\cassandra-actions\attributes\default.rb</path>
65 <lines>
66 <line>normal['version'] = "${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"</line>
67 </lines>
68 </file>
69 </files>
70 </configuration>
71 <executions>
72 <execution>
73 <id>write-text-files</id>
Michael Lando9dd269d2017-02-20 01:04:22 +020074 <phase>prepare-package</phase>
75 <goals>
Michael Lando2d3e1cb2017-07-25 22:53:44 +030076 <goal>write-text-files</goal>
Michael Lando9dd269d2017-02-20 01:04:22 +020077 </goals>
78 </execution>
79 </executions>
Michael Lando9dd269d2017-02-20 01:04:22 +020080 </plugin>
81 </plugins>
Michael Lando451a3402017-02-19 10:28:42 +020082 </build>
Michael Lando9dd269d2017-02-20 01:04:22 +020083
84 <profiles>
85 <profile>
ig6133142d2e62017-04-02 17:14:00 +030086 <id>docker-staging</id>
87 <properties>
ig61330f572ce2017-04-06 10:48:50 +030088 <docker.tag>${project.version}-STAGING-${maven.build.timestamp}</docker.tag>
89 <docker.latest.tag>${project.version}-STAGING-latest</docker.latest.tag>
ig6133142d2e62017-04-02 17:14:00 +030090 </properties>
91 </profile>
Michael Landoed64b5e2017-06-09 03:19:04 +030092
ig6133142d2e62017-04-02 17:14:00 +030093 <profile>
Michael Lando9dd269d2017-02-20 01:04:22 +020094 <id>docker</id>
Michael Landoed64b5e2017-06-09 03:19:04 +030095 <activation>
96 <activeByDefault>false</activeByDefault>
97 </activation>
Michael Lando9dd269d2017-02-20 01:04:22 +020098 <build>
99 <plugins>
100 <plugin>
101 <artifactId>maven-resources-plugin</artifactId>
102 <version>3.0.2</version>
103 <executions>
104 <execution>
Tal Gitelman68ccc452017-06-22 18:23:07 +0300105 <id>copy-resources-apidocs</id>
106 <phase>validate</phase>
107 <goals>
108 <goal>copy-resources</goal>
109 </goals>
110 <configuration>
111 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
112 <resources>
113 <resource>
114 <directory>${project.parent.basedir}/openecomp-be/tools/swagger-ui/api-docs</directory>
115 <includes>
116 <include>api-docs.war</include>
117 </includes>
118 </resource>
119 </resources>
120 </configuration>
121 </execution>
Tal Gitelman004829c2017-09-10 20:06:45 +0300122
123 <execution>
124 <id>copy-static-configuration-files</id>
125 <phase>validate</phase>
126 <goals>
127 <goal>copy-resources</goal>
128 </goals>
129 <configuration>
130 <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default</outputDirectory>
131 <resources>
132 <resource>
133 <directory>${project.parent.basedir}/catalog-be/src/main/resources/config</directory>
134 <includes>
135 <include>Artifact-Generator.properties</include>
136 <include>error-configuration.yaml</include>
137 <include>ecomp-error-configuration.yaml</include>
138 <include>logback.xml</include>
139 </includes>
140 </resource>
141 </resources>
142 </configuration>
143 </execution>
144
Tal Gitelman68ccc452017-06-22 18:23:07 +0300145 <execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200146 <id>copy-resources-be</id>
Michael Lando9dd269d2017-02-20 01:04:22 +0200147 <phase>validate</phase>
148 <goals>
149 <goal>copy-resources</goal>
150 </goals>
151 <configuration>
152 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
153 <resources>
154 <resource>
155 <directory>${project.parent.basedir}/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/target</directory>
156 <includes>
Michael Landoed64b5e2017-06-09 03:19:04 +0300157 <include>onboarding-be-${project.version}.war</include>
Michael Lando9dd269d2017-02-20 01:04:22 +0200158 </includes>
159 </resource>
160 </resources>
161 </configuration>
162 </execution>
163 <execution>
164 <id>copy-resources-fe</id>
Grinberg Motic3bda482017-02-23 11:24:34 +0200165 <phase>validate</phase>
166 <goals>
167 <goal>copy-resources</goal>
168 </goals>
169 <configuration>
170 <outputDirectory>${basedir}/sdc-frontend</outputDirectory>
171 <resources>
172 <resource>
173 <directory>${project.parent.basedir}/openecomp-ui/target</directory>
174 <includes>
175 <include>onboarding-fe-${project.version}.war</include>
176 </includes>
177 </resource>
178 </resources>
179 </configuration>
180 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200181 </executions>
182 </plugin>
183
184
185
186 <plugin>
187 <groupId>io.fabric8</groupId>
188 <artifactId>docker-maven-plugin</artifactId>
Idan Amit39987c82017-09-13 13:51:41 +0300189 <version>0.22.1</version>
Michael Lando9dd269d2017-02-20 01:04:22 +0200190
191 <configuration>
Idan Amit39987c82017-09-13 13:51:41 +0300192 <verbose>false</verbose>
Michael Lando9dd269d2017-02-20 01:04:22 +0200193 <apiVersion>1.23</apiVersion>
194
195 <images>
196
197 <!-- Build backend image -->
198 <image>
ig61330f572ce2017-04-06 10:48:50 +0300199 <name>openecomp/sdc-backend</name>
Michael Lando9dd269d2017-02-20 01:04:22 +0200200 <alias>sdc-backend</alias>
201 <build>
202 <cleanup>try</cleanup>
Michael Lando9dc57092017-02-20 23:46:47 +0200203 <dockerFileDir>${project.basedir}/sdc-backend</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300204 <tags>
205 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300206 <tag>${docker.latest.tag}</tag>
Michael Lando0ad3c802017-09-19 16:32:59 +0300207 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300208 </tags>
Michael Lando9dd269d2017-02-20 01:04:22 +0200209 </build>
210 </image>
211
212 <!-- Build frontend image -->
213 <image>
ig61330f572ce2017-04-06 10:48:50 +0300214 <name>openecomp/sdc-frontend</name>
Michael Lando9dd269d2017-02-20 01:04:22 +0200215 <alias>sdc-frontend</alias>
216 <build>
217 <cleanup>try</cleanup>
Michael Lando9dc57092017-02-20 23:46:47 +0200218 <dockerFileDir>${project.basedir}/sdc-frontend</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300219 <tags>
220 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300221 <tag>${docker.latest.tag}</tag>
Michael Lando0ad3c802017-09-19 16:32:59 +0300222 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300223 </tags>
Michael Lando9dd269d2017-02-20 01:04:22 +0200224 </build>
225 </image>
226
227 <!-- Build elastic search image -->
Michael Lando36771962017-03-01 10:05:34 +0200228 <image>
ig61330f572ce2017-04-06 10:48:50 +0300229 <name>openecomp/sdc-elasticsearch</name>
Michael Lando9dd269d2017-02-20 01:04:22 +0200230 <alias>sdc-elasticsearch</alias>
231 <build>
232 <cleanup>try</cleanup>
Michael Lando9dc57092017-02-20 23:46:47 +0200233 <dockerFileDir>${project.basedir}/sdc-elasticsearch</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300234 <tags>
235 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300236 <tag>${docker.latest.tag}</tag>
Michael Lando0ad3c802017-09-19 16:32:59 +0300237 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300238 </tags>
Michael Lando9dd269d2017-02-20 01:04:22 +0200239 </build>
Michael Lando36771962017-03-01 10:05:34 +0200240 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200241
242 <!-- Build kibana image -->
243 <image>
ig61330f572ce2017-04-06 10:48:50 +0300244 <name>openecomp/sdc-kibana</name>
Michael Lando9dd269d2017-02-20 01:04:22 +0200245 <alias>sdc-kibana</alias>
246 <build>
247 <cleanup>try</cleanup>
Michael Lando9dc57092017-02-20 23:46:47 +0200248 <dockerFileDir>${project.basedir}/sdc-kibana</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300249 <tags>
250 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300251 <tag>${docker.latest.tag}</tag>
Michael Lando0ad3c802017-09-19 16:32:59 +0300252 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300253 </tags>
Michael Lando9dd269d2017-02-20 01:04:22 +0200254 </build>
255 </image>
256
David Greenberg3d35bb32017-02-20 19:00:11 +0200257 <!-- Build cassandra image -->
Michael Lando9dd269d2017-02-20 01:04:22 +0200258 <image>
ig61330f572ce2017-04-06 10:48:50 +0300259 <name>openecomp/sdc-cassandra</name>
Michael Lando9dd269d2017-02-20 01:04:22 +0200260 <alias>sdc-cassandra</alias>
261 <build>
262 <cleanup>try</cleanup>
Michael Lando9dc57092017-02-20 23:46:47 +0200263 <dockerFileDir>${project.basedir}/sdc-cassandra</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300264 <tags>
265 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300266 <tag>${docker.latest.tag}</tag>
Michael Lando0ad3c802017-09-19 16:32:59 +0300267 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300268 </tags>
Michael Lando9dd269d2017-02-20 01:04:22 +0200269 </build>
270 </image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300271
Grinberg Motic3bda482017-02-23 11:24:34 +0200272 <!-- Build sanity image -->
Tal Gitelman69176382017-07-25 15:53:28 +0300273 <!-- <image>
ig61330f572ce2017-04-06 10:48:50 +0300274 <name>openecomp/sdc-sanity</name>
Grinberg Motic3bda482017-02-23 11:24:34 +0200275 <alias>sdc-sanity</alias>
276 <build>
277 <cleanup>try</cleanup>
278 <dockerFileDir>${project.basedir}/sdc-sanity</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300279 <tags>
280 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300281 <tag>${docker.latest.tag}</tag>
Michael Lando41c98602017-06-09 07:38:13 +0300282 <tag>1.1-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300283 </tags>
Grinberg Motic3bda482017-02-23 11:24:34 +0200284 </build>
Tal Gitelman69176382017-07-25 15:53:28 +0300285 </image> -->
Michael Lando9dd269d2017-02-20 01:04:22 +0200286
287 </images>
288 </configuration>
289 <executions>
290 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300291 <id>clean-images</id>
292 <phase>pre-clean</phase>
293 <goals>
Idan Amit39987c82017-09-13 13:51:41 +0300294 <goal>remove</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300295 </goals>
296 <configuration>
Idan Amit39987c82017-09-13 13:51:41 +0300297 <removeAll>true</removeAll>
Michael Landoed64b5e2017-06-09 03:19:04 +0300298 </configuration>
Michael Lando9dd269d2017-02-20 01:04:22 +0200299 </execution>
300
301 <execution>
302 <id>generate-images</id>
303 <phase>package</phase>
304 <goals>
305 <goal>build</goal>
306 </goals>
307 </execution>
308
309 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300310 <id>push-images</id>
311 <phase>deploy</phase>
312 <goals>
313 <goal>build</goal>
ml636ra90804d2017-02-22 15:50:20 +0200314 <goal>push</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300315 </goals>
316 <configuration>
Idan Amit39987c82017-09-13 13:51:41 +0300317 <image>openecomp/sdc-backend,openecomp/sdc-frontend,openecomp/sdc-elasticsearch,openecomp/sdc-kibana,openecomp/sdc-cassandra<!--,openecomp/sdc-sanity--></image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300318 </configuration>
Michael Lando9dd269d2017-02-20 01:04:22 +0200319 </execution>
320 </executions>
Michael Lando9dd269d2017-02-20 01:04:22 +0200321 </plugin>
Michael Lando9dd269d2017-02-20 01:04:22 +0200322 </plugins>
323 </build>
324 </profile>
325 </profiles>
Michael Lando451a3402017-02-19 10:28:42 +0200326</project>