Merge "Point Nexus proxy to new URL"
[sdc.git] / sdc-os-chef / pom.xml
1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
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>
11                 <version>1.1.0-SNAPSHOT</version>
12         </parent>
13
14         <properties>
15                 <docker.tag>${project.version}-SNAPSHOT-${maven.build.timestamp}</docker.tag>
16         </properties>
17
18         <build>
19                 <plugins>
20                         <plugin>
21                                 <groupId>com.google.code.maven-replacer-plugin</groupId>
22                                 <artifactId>replacer</artifactId>
23                                 <version>1.5.3</version>
24                                 <executions>
25                                         <execution>
26                                                 <phase>prepare-package</phase>
27                                                 <goals>
28                                                         <goal>replace</goal>
29                                                 </goals>
30                                         </execution>
31                                 </executions>
32
33                                 <configuration>
34                                         <basedir>${project.basedir}</basedir>
35                                         <includes>
36                                                 <include>sdc-backend/Dockerfile</include>
37                                                 <include>sdc-frontend/Dockerfile</include>
38                                                 <include>scripts/docker_run.sh</include>
39                                         </includes>
40                                         <replacements>
41                                                 <replacement>
42                                                         <token>__SDC-RELEASE__</token>
43                                                         <value>${project.version}</value>
44                                                 </replacement>
45                                         </replacements>
46                                 </configuration>
47                         </plugin>
48                 </plugins>
49         </build>
50
51         <profiles>
52                 <profile>
53                         <id>docker-staging</id>
54                         <properties>
55                                 <docker.tag>${project.version}-STAGING</docker.tag>
56                         </properties>
57                 </profile>
58                 <profile>
59                         <id>docker</id>
60                         <build>
61                                 <plugins>
62                                         <plugin>
63                                                 <artifactId>maven-resources-plugin</artifactId>
64                                                 <version>3.0.2</version>
65                                                 <executions>
66                                                         <execution>
67                                                                 <id>copy-resources-be</id>
68                                                                 <!-- here the phase you need -->
69                                                                 <phase>validate</phase>
70                                                                 <goals>
71                                                                         <goal>copy-resources</goal>
72                                                                 </goals>
73                                                                 <configuration>
74                                                                         <outputDirectory>${basedir}/sdc-backend</outputDirectory>
75                                                                         <resources>
76                                                                                 <resource>
77                                                                                         <directory>${project.parent.basedir}/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/target</directory>
78                                                                                         <includes>
79                                                                                                 <include>onboarding-be-*.war</include>
80                                                                                         </includes>
81                                                                                 </resource>
82                                                                         </resources>
83                                                                 </configuration>
84                                                         </execution>
85                                                         <execution>
86                                                                 <id>copy-resources-fe</id>
87                                                                 <!-- here the phase you need -->
88                                                                 <phase>validate</phase>
89                                                                 <goals>
90                                                                         <goal>copy-resources</goal>
91                                                                 </goals>
92                                                                 <configuration>
93                                                                         <outputDirectory>${basedir}/sdc-frontend</outputDirectory>
94                                                                         <resources>
95                                                                                 <resource>
96                                                                                         <directory>${project.parent.basedir}/openecomp-ui/target</directory>
97                                                                                         <includes>
98                                                                                                 <include>onboarding-fe-${project.version}.war</include>
99                                                                                         </includes>
100                                                                                 </resource>
101                                                                         </resources>
102                                                                 </configuration>
103                                                         </execution>
104                                                         <execution>
105                                                                 <id>copy-resources-sanity</id>
106                                                                 <!-- here the phase you need -->
107                                                                 <phase>validate</phase>
108                                                                 <goals>
109                                                                         <goal>copy-resources</goal>
110                                                                 </goals>
111                                                                 <configuration>
112                                                                         <outputDirectory>${basedir}/sdc-frontend</outputDirectory>
113                                                                         <resources>
114                                                                                 <resource>
115                                                                                         <directory>${project.parent.basedir}/openecomp-ui/target</directory>
116                                                                                         <includes>
117                                                                                                 <include>onboarding-fe-${project.version}.war</include>
118                                                                                         </includes>
119                                                                                 </resource>
120                                                                         </resources>
121                                                                 </configuration>
122                                                         </execution>
123                                                 </executions>
124                                         </plugin>
125
126
127
128                                         <plugin>
129                                                 <groupId>io.fabric8</groupId>
130                                                 <artifactId>docker-maven-plugin</artifactId>
131                                                 <version>0.19.1</version>
132
133                                                 <configuration>
134                                                         <verbose>true</verbose>
135                                                         <apiVersion>1.23</apiVersion>
136
137                                                         <images>
138
139                                                                 <!-- Build backend image -->
140                                                                 <image>
141                                                                         <name>openecomp/sdc-backend:%l</name>
142                                                                         <alias>sdc-backend</alias>
143                                                                         <build>
144                                                                                 <cleanup>try</cleanup>
145                                                                                 <dockerFileDir>${project.basedir}/sdc-backend</dockerFileDir>
146                                                                                 <tags>
147                                                                                         <tag>${docker.tag}</tag>
148                                                                                 </tags>
149                                                                         </build>
150                                                                 </image>
151
152                                                                 <!-- Build frontend image -->
153                                                                 <image>
154                                                                         <name>openecomp/sdc-frontend:%l</name>
155                                                                         <alias>sdc-frontend</alias>
156                                                                         <build>
157                                                                                 <cleanup>try</cleanup>
158                                                                                 <dockerFileDir>${project.basedir}/sdc-frontend</dockerFileDir>
159                                                                                 <tags>
160                                                                                         <tag>${docker.tag}</tag>
161                                                                                 </tags>
162                                                                         </build>
163                                                                 </image>
164
165                                                                 <!-- Build elastic search image -->
166                                                                 <image>
167                                                                         <name>openecomp/sdc-elasticsearch:%l</name>
168                                                                         <alias>sdc-elasticsearch</alias>
169                                                                         <build>
170                                                                                 <cleanup>try</cleanup>
171                                                                                 <dockerFileDir>${project.basedir}/sdc-elasticsearch</dockerFileDir>
172                                                                                 <tags>
173                                                                                         <tag>${docker.tag}</tag>
174                                                                                 </tags>
175                                                                         </build>
176                                                                 </image>
177
178                                                                 <!-- Build kibana image -->
179                                                                 <image>
180                                                                         <name>openecomp/sdc-kibana:%l</name>
181                                                                         <alias>sdc-kibana</alias>
182                                                                         <build>
183                                                                                 <cleanup>try</cleanup>
184                                                                                 <dockerFileDir>${project.basedir}/sdc-kibana</dockerFileDir>
185                                                                                 <tags>
186                                                                                         <tag>${docker.tag}</tag>
187                                                                                 </tags>
188                                                                         </build>
189                                                                 </image>
190
191                                                                 <!-- Build cassandra image -->
192                                                                 <image>
193                                                                         <name>openecomp/sdc-cassandra:%l</name>
194                                                                         <alias>sdc-cassandra</alias>
195                                                                         <build>
196                                                                                 <cleanup>try</cleanup>
197                                                                                 <dockerFileDir>${project.basedir}/sdc-cassandra</dockerFileDir>
198                                                                                 <tags>
199                                                                                         <tag>${docker.tag}</tag>
200                                                                                 </tags>
201                                                                         </build>
202                                                                 </image>
203                                                                 
204                                                                 <!-- Build sanity image -->
205                                                                 <image>
206                                                                         <name>openecomp/sdc-sanity:%l</name>
207                                                                         <alias>sdc-sanity</alias>
208                                                                         <build>
209                                                                                 <cleanup>try</cleanup>
210                                                                                 <dockerFileDir>${project.basedir}/sdc-sanity</dockerFileDir>
211                                                                                 <tags>
212                                                                                         <tag>${docker.tag}</tag>
213                                                                                 </tags>
214                                                                         </build>
215                                                                 </image>
216
217                                                         </images>
218                                                 </configuration>
219                                                 <executions>
220                                                         <execution>
221                                                                 <id>clean-images</id>
222                                                                 <phase>pre-clean</phase>
223                                                                 <goals>
224                                                                         <goal>remove</goal>
225                                                                 </goals>
226                                                                 <configuration>
227                                                                         <removeAll>true</removeAll>
228                                                                         <image>openecomp/sdc-backend:%l,openecomp/sdc-frontend:%l,openecomp/sdc-elasticsearch:%l,openecomp/sdc-kibana:%l,openecomp/sdc-sanity:%l</image>
229                                                                 </configuration>
230                                                         </execution>
231
232                                                         <execution>
233                                                                 <id>generate-images</id>
234                                                                 <phase>package</phase>
235                                                                 <goals>
236                                                                         <goal>build</goal>
237                                                                 </goals>
238                                                         </execution>
239
240                                                         <execution>
241                                                                 <id>push-images</id>
242                                                                 <phase>deploy</phase>
243                                                                 <goals>
244                                                                         <goal>push</goal>
245                                                                 </goals>
246                                                                 <configuration>
247                                                                         <image>openecomp/sdc-backend:%l,openecomp/sdc-frontend:%l,openecomp/sdc-elasticsearch:%l,openecomp/sdc-kibana:%l,openecomp/sdc-sanity:%l</image>
248                                                                 </configuration>
249                                                         </execution>
250                                                 </executions>
251
252                                         </plugin>
253
254                                 </plugins>
255                         </build>
256                 </profile>
257         </profiles>
258 </project>