Initial OpenECOMP appc/deployment commit
[appc/deployment.git] / installation / appc / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4
5         <parent>
6                 <groupId>org.openecomp.appc.deployment</groupId>
7                 <artifactId>installation</artifactId>
8                 <version>1.0.0</version>
9         </parent>
10
11         <modelVersion>4.0.0</modelVersion>
12         <packaging>pom</packaging>
13         <groupId>org.openecomp.appc.deployment</groupId>
14         <artifactId>installation-appc</artifactId>
15         <version>1.0.0</version>
16
17         <name>Installation - APPC Docker</name>
18         <description>Creates APPC Docker container on top of the SDNC Base Docker Image</description>
19
20         <properties>
21                 <image.name>ecomp/appc-image</image.name>
22                 <appc.version>${project.version}</appc.version>
23         </properties>
24
25
26         <build>
27                 <plugins>
28                         <plugin>
29                                 <groupId>io.fabric8</groupId>
30                                 <artifactId>docker-maven-plugin</artifactId>
31                                 <version>0.16.5</version>
32                                 <inherited>false</inherited>
33                                 <configuration>
34                                         <images>
35                                                 <image>
36                                                         <name>${image.name}</name>
37                                                         <build>
38                                                                 <cleanup>try</cleanup>
39                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
40                                                                 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
41                                                                 <tags>
42                                                                     <tag>${project.version}</tag>
43                                                                         <!-- <tag>release2</tag> -->
44                                                                 </tags>
45                                                         </build>
46                                                 </image>
47                                         </images>
48                                 </configuration>
49                                 <executions>
50                                         <execution>
51                                                 <id>generate-images</id>
52                                                 <phase>generate-sources</phase>
53                                                 <goals>
54                                                         <goal>build</goal>
55                                                 </goals>
56                                         </execution>
57
58                                         <execution>
59                                                 <id>push-images</id>
60                                                 <phase>deploy</phase>
61                                                 <goals>
62                                                         <goal>build</goal>
63                                                         <goal>push</goal>
64                                                 </goals>
65                                         </execution>
66                                 </executions>
67                         </plugin>
68                         
69                         <!-- This is to add any extra scripts, sql dump files, properties files APPC may need even after inheriting from the sdnc base image -->
70                         <plugin>
71                                 <artifactId>maven-resources-plugin</artifactId>
72                                 <version>2.6</version>
73                                 <executions>
74                                         <execution>
75                                                 <id>copy-dockerfile</id>
76                                                 <goals>
77                                                         <goal>copy-resources</goal>
78                                                 </goals><!-- here the phase you need -->
79                                                 <phase>validate</phase>
80                                                 <configuration>
81                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
82                                                         <resources>
83                                                                 <resource>
84                                                                         <directory>src/main/docker</directory>
85                                                                         <includes>
86                                                                                 <include>Dockerfile</include>
87                                                                         </includes>
88                                                                         <filtering>true</filtering>
89                                                                 </resource>
90                                                         </resources>
91                                                 </configuration>
92                                         </execution>
93
94                                         <execution>
95                                                 <id>copy-scripts</id>
96                                                 <goals>
97                                                         <goal>copy-resources</goal>
98                                                 </goals><!-- here the phase you need -->
99                                                 <phase>validate</phase>
100                                                 <configuration>
101                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/bin</outputDirectory>
102                                                         <resources>
103                                                                 <resource>
104                                                                         <directory>src/main/scripts</directory>
105                                                                         <includes>
106                                                                                 <include>*.sh</include>
107                                                                         </includes>
108                                                                         <filtering>false</filtering>
109                                                                 </resource>
110                                                         </resources>
111                                                 </configuration>
112                                         </execution>
113                                         
114                                         <!-- Two commented execution tags below in case / when appc needs to add .dump mysql files or keystore files -->
115                                         <!--<execution>
116                                                 <id>copy-data</id>
117                                                 <goals>
118                                                         <goal>copy-resources</goal>
119                                                 </goals>
120                                                 <phase>validate</phase>
121                                                 <configuration>
122                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data</outputDirectory>
123                                                         <resources>
124                                                                 <resource>
125                                                                         <directory>src/main/resources</directory>
126                                                                         <includes>
127                                                                                 <include>*.dump</include>
128                                                                         </includes>
129                                                                         <filtering>false</filtering>
130                                                                 </resource>
131                                                         </resources>
132                                                 </configuration>
133                                         </execution>
134                                         <execution>
135                                                 <id>copy-keystores</id>
136                                                 <goals>
137                                                         <goal>copy-resources</goal>
138                                                 </goals>
139                                                 <phase>validate</phase>
140                                                 <configuration>
141                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/stores</outputDirectory>
142                                                         <resources>
143                                                                 <resource>
144                                                                         <directory>../src/main/stores</directory>
145                                                                         <includes>
146                                                                                 <include>*.jks</include>
147                                                                         </includes>
148                                                                         <filtering>false</filtering>
149                                                                 </resource>
150                                                         </resources>
151                                                 </configuration>
152                                         </execution>-->
153                                         
154                                         <execution>
155                                                 <id>copy-properties</id>
156                                                 <goals>
157                                                         <goal>copy-resources</goal>
158                                                 </goals>
159                                                 <phase>validate</phase>
160                                                 <configuration>
161                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/properties</outputDirectory>
162                                                         <resources>
163                                                                 <resource>
164                                                                         <directory>../src/main/appc-properties</directory>
165                                                                         <includes>
166                                                                                 <include>*.properties</include>
167                                                                         </includes>
168                                                                         <filtering>false</filtering>
169                                                                 </resource>
170                                                         </resources>
171                                                 </configuration>
172                                         </execution>
173                                 </executions>
174                         </plugin>
175                         <plugin>
176                                 <artifactId>exec-maven-plugin</artifactId>
177                                 <groupId>org.codehaus.mojo</groupId>
178                                 <executions>
179                                         <execution>
180                                                 <id>Get features</id>
181                                                 <phase>generate-sources</phase>
182                                                 <goals>
183                                                         <goal>exec</goal>
184                                                 </goals>
185                                                 <configuration>
186                                                         <executable>/bin/bash</executable>
187                                                         <environmentVariables>
188                                                                 <APPC_VERSION>${appc.version}</APPC_VERSION>
189                                                                 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
190                                                                 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
191                                                         </environmentVariables>
192                                                         <arguments>
193                                                                 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
194                                                                 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
195                                                         </arguments>
196                                                 </configuration>
197                                         </execution>
198
199                                         <execution>
200                                                 <id>change shell permissions</id>
201                                                 <phase>process-sources</phase>
202                                                 <goals>
203                                                         <goal>exec</goal>
204                                                 </goals>
205                                                 <configuration>
206                                                         <executable>/usr/bin/find</executable>
207                                                         <arguments>
208                                                                 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
209                                                                 <argument>-name</argument>
210                                                                 <argument>*.sh</argument>
211                                                                 <argument>-exec</argument>
212                                                                 <argument>chmod</argument>
213                                                                 <argument>+x</argument>
214                                                                 <argument>{}</argument>
215                                                                 <argument>;</argument>
216                                                         </arguments>
217                                                 </configuration>
218                                         </execution>
219                                 </executions>
220                         </plugin>
221                 </plugins>
222         </build>
223         
224         <organization>
225                 <name>openECOMP</name>
226         </organization>
227         
228 </project>