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.1.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.1.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>1.0.0</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 <!-- Commented tags 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>
100 <id>copy-keystores</id>
102 <goal>copy-resources</goal>
104 <phase>validate</phase>
106 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/stores</outputDirectory>
109 <directory>../src/main/stores</directory>
111 <include>*.jks</include>
112 <include>*.p12</include>
114 <filtering>false</filtering>
121 <id>copy-properties</id>
123 <goal>copy-resources</goal>
125 <phase>validate</phase>
127 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/properties</outputDirectory>
130 <directory>../src/main/properties</directory>
132 <include>*.properties</include>
134 <filtering>false</filtering>
142 <artifactId>exec-maven-plugin</artifactId>
143 <groupId>org.codehaus.mojo</groupId>
144 <version>1.5.0</version>
147 <id>Get features</id>
148 <phase>generate-sources</phase>
153 <executable>bash</executable>
154 <environmentVariables>
155 <APPC_VERSION>${appc.version}</APPC_VERSION>
156 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
157 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
158 </environmentVariables>
160 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
161 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
167 <id>change shell permissions</id>
168 <phase>process-sources</phase>
173 <executable>find</executable>
175 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
176 <argument>-name</argument>
177 <argument>*.sh</argument>
178 <argument>-exec</argument>
179 <argument>chmod</argument>
180 <argument>+x</argument>
181 <argument>{}</argument>
182 <argument>;</argument>
197 <groupId>org.codehaus.groovy.maven</groupId>
198 <artifactId>gmaven-plugin</artifactId>
201 <phase>validate</phase>
207 <ver>${project.version}</ver>
208 <timestamp>${maven.build.timestamp}</timestamp>
211 println project.properties['ver'];
213 if ( project.properties['ver'] != null ) {
214 versionArray = project.properties['ver'].split('\\.');
216 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
217 project.properties['dockertag1']=project.properties['ver'] + "-latest";
218 project.properties['dockertag2']="latest";
220 project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
221 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
223 println 'docker tag 1: ' + project.properties['dockertag1'];
224 println 'docker tag 2: ' + project.properties['dockertag2'];
231 <groupId>io.fabric8</groupId>
232 <artifactId>docker-maven-plugin</artifactId>
233 <version>0.16.5</version>
234 <inherited>false</inherited>
238 <name>${image.name}</name>
240 <cleanup>try</cleanup>
241 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
242 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
244 <tag>${dockertag1}</tag>
245 <tag>${dockertag2}</tag>
253 <id>generate-images</id>
254 <phase>package</phase>
262 <phase>deploy</phase>
271 <!-- This is to add any extra scripts, sql dump files, properties files
272 APPC may need even after inheriting from the sdnc base image -->
274 <artifactId>maven-resources-plugin</artifactId>
275 <version>2.6</version>
278 <id>copy-dockerfile</id>
280 <goal>copy-resources</goal>
281 </goals><!-- here the phase you need -->
282 <phase>validate</phase>
284 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
287 <directory>src/main/docker</directory>
289 <include>Dockerfile</include>
291 <filtering>true</filtering>
298 <id>copy-scripts</id>
300 <goal>copy-resources</goal>
301 </goals><!-- here the phase you need -->
302 <phase>validate</phase>
304 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/bin</outputDirectory>
307 <directory>src/main/scripts</directory>
309 <include>*.sh</include>
311 <filtering>false</filtering>
317 <!-- Two commented execution tags below in case / when appc needs
318 to add .dump mysql files or keystore files -->
322 <goal>copy-resources</goal>
324 <phase>validate</phase>
326 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data</outputDirectory>
329 <directory>src/main/resources</directory>
331 <include>*.dump</include>
333 <filtering>false</filtering>
340 <id>copy-keystores</id>
342 <goal>copy-resources</goal>
344 <phase>validate</phase>
346 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/stores</outputDirectory>
349 <directory>../src/main/stores</directory>
351 <include>*.jks</include>
352 <include>*.p12</include>
354 <filtering>false</filtering>
361 <id>copy-properties</id>
363 <goal>copy-resources</goal>
365 <phase>validate</phase>
367 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/properties</outputDirectory>
370 <directory>../src/main/properties</directory>
372 <include>*.properties</include>
374 <filtering>false</filtering>
382 <artifactId>exec-maven-plugin</artifactId>
383 <groupId>org.codehaus.mojo</groupId>
384 <version>1.5.0</version>
387 <id>Get features</id>
388 <phase>generate-sources</phase>
393 <executable>bash</executable>
394 <environmentVariables>
395 <APPC_VERSION>${appc.version}</APPC_VERSION>
396 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
397 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
398 </environmentVariables>
400 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
401 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
407 <id>change shell permissions</id>
408 <phase>process-sources</phase>
413 <executable>find</executable>
415 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
416 <argument>-name</argument>
417 <argument>*.sh</argument>
418 <argument>-exec</argument>
419 <argument>chmod</argument>
420 <argument>+x</argument>
421 <argument>{}</argument>
422 <argument>;</argument>
435 <name>openECOMP</name>