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">
6 <groupId>org.openecomp.appc.deployment</groupId>
7 <artifactId>installation</artifactId>
8 <version>1.0.0-SNAPSHOT</version>
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-SNAPSHOT</version>
17 <name>Installation - APPC Docker</name>
18 <description>Creates APPC Docker container on top of the SDNC Base Docker Image</description>
21 <image.name>openecomp/appc-image</image.name>
22 <appc.version>${project.version}</appc.version>
23 <!--This version will be over-ridden by jenkins
24 injecting the version.properties variable file during docker build-->
25 <appc.docker.staging.version>0.0.1</appc.docker.staging.version>
26 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
33 <!-- This is to add any extra scripts, sql dump files, properties files APPC may need even after inheriting from the sdnc base image -->
35 <artifactId>maven-resources-plugin</artifactId>
36 <version>2.6</version>
39 <id>copy-dockerfile</id>
41 <goal>copy-resources</goal>
42 </goals><!-- here the phase you need -->
43 <phase>validate</phase>
45 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
48 <directory>src/main/docker</directory>
50 <include>Dockerfile</include>
52 <filtering>true</filtering>
61 <goal>copy-resources</goal>
62 </goals><!-- here the phase you need -->
63 <phase>validate</phase>
65 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/bin</outputDirectory>
68 <directory>src/main/scripts</directory>
70 <include>*.sh</include>
72 <filtering>false</filtering>
78 <!-- Two commented execution tags below in case / when appc needs to add .dump mysql files or keystore files -->
82 <goal>copy-resources</goal>
84 <phase>validate</phase>
86 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data</outputDirectory>
89 <directory>src/main/resources</directory>
91 <include>*.dump</include>
93 <filtering>false</filtering>
99 <id>copy-keystores</id>
101 <goal>copy-resources</goal>
103 <phase>validate</phase>
105 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/stores</outputDirectory>
108 <directory>../src/main/stores</directory>
110 <include>*.jks</include>
112 <filtering>false</filtering>
119 <id>copy-properties</id>
121 <goal>copy-resources</goal>
123 <phase>validate</phase>
125 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/properties</outputDirectory>
128 <directory>../src/main/appc-properties</directory>
130 <include>*.properties</include>
132 <filtering>false</filtering>
140 <artifactId>exec-maven-plugin</artifactId>
141 <groupId>org.codehaus.mojo</groupId>
144 <id>Get features</id>
145 <phase>generate-sources</phase>
150 <executable>/bin/bash</executable>
151 <environmentVariables>
152 <APPC_VERSION>${appc.version}</APPC_VERSION>
153 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
154 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
155 </environmentVariables>
157 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
158 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
164 <id>change shell permissions</id>
165 <phase>process-sources</phase>
170 <executable>/usr/bin/find</executable>
172 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
173 <argument>-name</argument>
174 <argument>*.sh</argument>
175 <argument>-exec</argument>
176 <argument>chmod</argument>
177 <argument>+x</argument>
178 <argument>{}</argument>
179 <argument>;</argument>
194 <groupId>io.fabric8</groupId>
195 <artifactId>docker-maven-plugin</artifactId>
196 <version>0.16.5</version>
197 <inherited>false</inherited>
201 <name>${image.name}</name>
203 <cleanup>try</cleanup>
204 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
205 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
207 <tag>${appc.docker.staging.version}-STAGING-${maven.build.timestamp}</tag>
216 <id>generate-images</id>
217 <phase>generate-sources</phase>
225 <phase>deploy</phase>
234 <!-- This is to add any extra scripts, sql dump files, properties files
235 APPC may need even after inheriting from the sdnc base image -->
237 <artifactId>maven-resources-plugin</artifactId>
238 <version>2.6</version>
241 <id>copy-dockerfile</id>
243 <goal>copy-resources</goal>
244 </goals><!-- here the phase you need -->
245 <phase>validate</phase>
247 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
250 <directory>src/main/docker</directory>
252 <include>Dockerfile</include>
254 <filtering>true</filtering>
261 <id>copy-scripts</id>
263 <goal>copy-resources</goal>
264 </goals><!-- here the phase you need -->
265 <phase>validate</phase>
267 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/bin</outputDirectory>
270 <directory>src/main/scripts</directory>
272 <include>*.sh</include>
274 <filtering>false</filtering>
280 <!-- Two commented execution tags below in case / when appc needs
281 to add .dump mysql files or keystore files -->
282 <!--<execution> <id>copy-data</id> <goals> <goal>copy-resources</goal>
283 </goals> <phase>validate</phase> <configuration> <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data</outputDirectory>
284 <resources> <resource> <directory>src/main/resources</directory> <includes>
285 <include>*.dump</include> </includes> <filtering>false</filtering> </resource>
286 </resources> </configuration> </execution> <execution> <id>copy-keystores</id>
287 <goals> <goal>copy-resources</goal> </goals> <phase>validate</phase> <configuration>
288 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/stores</outputDirectory>
289 <resources> <resource> <directory>../src/main/stores</directory> <includes>
290 <include>*.jks</include> </includes> <filtering>false</filtering> </resource>
291 </resources> </configuration> </execution> -->
294 <id>copy-properties</id>
296 <goal>copy-resources</goal>
298 <phase>validate</phase>
300 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/properties</outputDirectory>
303 <directory>../src/main/appc-properties</directory>
305 <include>*.properties</include>
307 <filtering>false</filtering>
315 <artifactId>exec-maven-plugin</artifactId>
316 <groupId>org.codehaus.mojo</groupId>
319 <id>Get features</id>
320 <phase>generate-sources</phase>
325 <executable>/bin/bash</executable>
326 <environmentVariables>
327 <APPC_VERSION>${appc.version}</APPC_VERSION>
328 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
329 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
330 </environmentVariables>
332 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
333 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
339 <id>change shell permissions</id>
340 <phase>process-sources</phase>
345 <executable>/usr/bin/find</executable>
347 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
348 <argument>-name</argument>
349 <argument>*.sh</argument>
350 <argument>-exec</argument>
351 <argument>chmod</argument>
352 <argument>+x</argument>
353 <argument>{}</argument>
354 <argument>;</argument>
367 <name>openECOMP</name>