blob: d0131e4e557abb791488c185fe8e87682d983487 [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 Landoebd7c8f2017-03-15 20:38:00 +020011 <version>1.1.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>
41 </filesets>
42 </configuration>
43 </execution>
44 </executions>
45 </plugin>
46 <plugin>
47 <groupId>ru.yaal.maven</groupId>
48 <artifactId>write-text-files-maven-plugin</artifactId>
49 <version>1.1</version>
50 <configuration>
51 <charset>UTF-8</charset>
52 <files>
53 <file>
54 <path>${project.basedir}\sdc-cassandra\chef-repo\cookbooks\cassandra-actions\attributes\default.rb</path>
55 <lines>
56 <line>normal['version'] = "${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"</line>
57 </lines>
58 </file>
59 </files>
60 </configuration>
61 <executions>
62 <execution>
63 <id>write-text-files</id>
Michael Lando9dd269d2017-02-20 01:04:22 +020064 <phase>prepare-package</phase>
65 <goals>
Michael Lando2d3e1cb2017-07-25 22:53:44 +030066 <goal>write-text-files</goal>
Michael Lando9dd269d2017-02-20 01:04:22 +020067 </goals>
68 </execution>
69 </executions>
Michael Lando9dd269d2017-02-20 01:04:22 +020070 </plugin>
71 </plugins>
Michael Lando451a3402017-02-19 10:28:42 +020072 </build>
Michael Lando9dd269d2017-02-20 01:04:22 +020073
74 <profiles>
75 <profile>
ig6133142d2e62017-04-02 17:14:00 +030076 <id>docker-staging</id>
77 <properties>
ig61330f572ce2017-04-06 10:48:50 +030078 <docker.tag>${project.version}-STAGING-${maven.build.timestamp}</docker.tag>
79 <docker.latest.tag>${project.version}-STAGING-latest</docker.latest.tag>
ig6133142d2e62017-04-02 17:14:00 +030080 </properties>
81 </profile>
Michael Landoed64b5e2017-06-09 03:19:04 +030082
ig6133142d2e62017-04-02 17:14:00 +030083 <profile>
Michael Lando9dd269d2017-02-20 01:04:22 +020084 <id>docker</id>
Michael Landoed64b5e2017-06-09 03:19:04 +030085 <activation>
86 <activeByDefault>false</activeByDefault>
87 </activation>
Michael Lando9dd269d2017-02-20 01:04:22 +020088 <build>
89 <plugins>
90 <plugin>
91 <artifactId>maven-resources-plugin</artifactId>
92 <version>3.0.2</version>
93 <executions>
94 <execution>
Tal Gitelman68ccc452017-06-22 18:23:07 +030095 <id>copy-resources-apidocs</id>
96 <phase>validate</phase>
97 <goals>
98 <goal>copy-resources</goal>
99 </goals>
100 <configuration>
101 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
102 <resources>
103 <resource>
104 <directory>${project.parent.basedir}/openecomp-be/tools/swagger-ui/api-docs</directory>
105 <includes>
106 <include>api-docs.war</include>
107 </includes>
108 </resource>
109 </resources>
110 </configuration>
111 </execution>
112 <execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200113 <id>copy-resources-be</id>
Michael Lando9dd269d2017-02-20 01:04:22 +0200114 <phase>validate</phase>
115 <goals>
116 <goal>copy-resources</goal>
117 </goals>
118 <configuration>
119 <outputDirectory>${basedir}/sdc-backend</outputDirectory>
120 <resources>
121 <resource>
122 <directory>${project.parent.basedir}/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/target</directory>
123 <includes>
Michael Landoed64b5e2017-06-09 03:19:04 +0300124 <include>onboarding-be-${project.version}.war</include>
Michael Lando9dd269d2017-02-20 01:04:22 +0200125 </includes>
126 </resource>
127 </resources>
128 </configuration>
129 </execution>
130 <execution>
131 <id>copy-resources-fe</id>
Grinberg Motic3bda482017-02-23 11:24:34 +0200132 <phase>validate</phase>
133 <goals>
134 <goal>copy-resources</goal>
135 </goals>
136 <configuration>
137 <outputDirectory>${basedir}/sdc-frontend</outputDirectory>
138 <resources>
139 <resource>
140 <directory>${project.parent.basedir}/openecomp-ui/target</directory>
141 <includes>
142 <include>onboarding-fe-${project.version}.war</include>
143 </includes>
144 </resource>
145 </resources>
146 </configuration>
147 </execution>
Michael Lando9dd269d2017-02-20 01:04:22 +0200148 </executions>
149 </plugin>
150
151
152
153 <plugin>
154 <groupId>io.fabric8</groupId>
155 <artifactId>docker-maven-plugin</artifactId>
Michael Lando9dc57092017-02-20 23:46:47 +0200156 <version>0.19.1</version>
Michael Lando9dd269d2017-02-20 01:04:22 +0200157
158 <configuration>
159 <verbose>true</verbose>
160 <apiVersion>1.23</apiVersion>
161
162 <images>
163
164 <!-- Build backend image -->
165 <image>
ig61330f572ce2017-04-06 10:48:50 +0300166 <name>openecomp/sdc-backend</name>
Michael Lando9dd269d2017-02-20 01:04:22 +0200167 <alias>sdc-backend</alias>
168 <build>
169 <cleanup>try</cleanup>
Michael Lando9dc57092017-02-20 23:46:47 +0200170 <dockerFileDir>${project.basedir}/sdc-backend</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300171 <tags>
172 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300173 <tag>${docker.latest.tag}</tag>
Michael Lando41c98602017-06-09 07:38:13 +0300174 <tag>1.1-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300175 </tags>
Michael Lando9dd269d2017-02-20 01:04:22 +0200176 </build>
177 </image>
178
179 <!-- Build frontend image -->
180 <image>
ig61330f572ce2017-04-06 10:48:50 +0300181 <name>openecomp/sdc-frontend</name>
Michael Lando9dd269d2017-02-20 01:04:22 +0200182 <alias>sdc-frontend</alias>
183 <build>
184 <cleanup>try</cleanup>
Michael Lando9dc57092017-02-20 23:46:47 +0200185 <dockerFileDir>${project.basedir}/sdc-frontend</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300186 <tags>
187 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300188 <tag>${docker.latest.tag}</tag>
Michael Lando41c98602017-06-09 07:38:13 +0300189 <tag>1.1-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300190 </tags>
Michael Lando9dd269d2017-02-20 01:04:22 +0200191 </build>
192 </image>
193
194 <!-- Build elastic search image -->
Michael Lando36771962017-03-01 10:05:34 +0200195 <image>
ig61330f572ce2017-04-06 10:48:50 +0300196 <name>openecomp/sdc-elasticsearch</name>
Michael Lando9dd269d2017-02-20 01:04:22 +0200197 <alias>sdc-elasticsearch</alias>
198 <build>
199 <cleanup>try</cleanup>
Michael Lando9dc57092017-02-20 23:46:47 +0200200 <dockerFileDir>${project.basedir}/sdc-elasticsearch</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300201 <tags>
202 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300203 <tag>${docker.latest.tag}</tag>
Michael Lando41c98602017-06-09 07:38:13 +0300204 <tag>1.1-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300205 </tags>
Michael Lando9dd269d2017-02-20 01:04:22 +0200206 </build>
Michael Lando36771962017-03-01 10:05:34 +0200207 </image>
Michael Lando9dd269d2017-02-20 01:04:22 +0200208
209 <!-- Build kibana image -->
210 <image>
ig61330f572ce2017-04-06 10:48:50 +0300211 <name>openecomp/sdc-kibana</name>
Michael Lando9dd269d2017-02-20 01:04:22 +0200212 <alias>sdc-kibana</alias>
213 <build>
214 <cleanup>try</cleanup>
Michael Lando9dc57092017-02-20 23:46:47 +0200215 <dockerFileDir>${project.basedir}/sdc-kibana</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300216 <tags>
217 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300218 <tag>${docker.latest.tag}</tag>
Michael Lando41c98602017-06-09 07:38:13 +0300219 <tag>1.1-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300220 </tags>
Michael Lando9dd269d2017-02-20 01:04:22 +0200221 </build>
222 </image>
223
David Greenberg3d35bb32017-02-20 19:00:11 +0200224 <!-- Build cassandra image -->
Michael Lando9dd269d2017-02-20 01:04:22 +0200225 <image>
ig61330f572ce2017-04-06 10:48:50 +0300226 <name>openecomp/sdc-cassandra</name>
Michael Lando9dd269d2017-02-20 01:04:22 +0200227 <alias>sdc-cassandra</alias>
228 <build>
229 <cleanup>try</cleanup>
Michael Lando9dc57092017-02-20 23:46:47 +0200230 <dockerFileDir>${project.basedir}/sdc-cassandra</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300231 <tags>
232 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300233 <tag>${docker.latest.tag}</tag>
Michael Lando41c98602017-06-09 07:38:13 +0300234 <tag>1.1-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300235 </tags>
Michael Lando9dd269d2017-02-20 01:04:22 +0200236 </build>
237 </image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300238
Grinberg Motic3bda482017-02-23 11:24:34 +0200239 <!-- Build sanity image -->
Tal Gitelman69176382017-07-25 15:53:28 +0300240 <!-- <image>
ig61330f572ce2017-04-06 10:48:50 +0300241 <name>openecomp/sdc-sanity</name>
Grinberg Motic3bda482017-02-23 11:24:34 +0200242 <alias>sdc-sanity</alias>
243 <build>
244 <cleanup>try</cleanup>
245 <dockerFileDir>${project.basedir}/sdc-sanity</dockerFileDir>
ig6133142d2e62017-04-02 17:14:00 +0300246 <tags>
247 <tag>${docker.tag}</tag>
ig61330f572ce2017-04-06 10:48:50 +0300248 <tag>${docker.latest.tag}</tag>
Michael Lando41c98602017-06-09 07:38:13 +0300249 <tag>1.1-STAGING-latest</tag>
ig6133142d2e62017-04-02 17:14:00 +0300250 </tags>
Grinberg Motic3bda482017-02-23 11:24:34 +0200251 </build>
Tal Gitelman69176382017-07-25 15:53:28 +0300252 </image> -->
Michael Lando9dd269d2017-02-20 01:04:22 +0200253
254 </images>
255 </configuration>
256 <executions>
257 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300258 <id>clean-images</id>
259 <phase>pre-clean</phase>
260 <goals>
261 <goal>remove</goal>
262 </goals>
263 <configuration>
264 <removeAll>true</removeAll>
Tal Gitelman69176382017-07-25 15:53:28 +0300265 <image>openecomp/sdc-backend,openecomp/sdc-frontend,openecomp/sdc-elasticsearch,openecomp/sdc-kibana<!-- ,openecomp/sdc-sanity --></image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300266 </configuration>
Michael Lando9dd269d2017-02-20 01:04:22 +0200267 </execution>
268
269 <execution>
270 <id>generate-images</id>
271 <phase>package</phase>
272 <goals>
273 <goal>build</goal>
274 </goals>
275 </execution>
276
277 <execution>
Michael Landoed64b5e2017-06-09 03:19:04 +0300278 <id>push-images</id>
279 <phase>deploy</phase>
280 <goals>
281 <goal>build</goal>
ml636ra90804d2017-02-22 15:50:20 +0200282 <goal>push</goal>
Michael Landoed64b5e2017-06-09 03:19:04 +0300283 </goals>
284 <configuration>
Tal Gitelman69176382017-07-25 15:53:28 +0300285 <image>openecomp/sdc-backend,openecomp/sdc-frontend,openecomp/sdc-elasticsearch,openecomp/sdc-kibana<!-- ,openecomp/sdc-sanity --></image>
Michael Landoed64b5e2017-06-09 03:19:04 +0300286 </configuration>
Michael Lando9dd269d2017-02-20 01:04:22 +0200287 </execution>
288 </executions>
Michael Lando9dd269d2017-02-20 01:04:22 +0200289 </plugin>
Michael Lando9dd269d2017-02-20 01:04:22 +0200290 </plugins>
291 </build>
292 </profile>
293 </profiles>
Michael Lando451a3402017-02-19 10:28:42 +0200294</project>