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>
81 <goal>copy-resources</goal>
83 <phase>validate</phase>
85 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data</outputDirectory>
88 <directory>src/main/resources</directory>
90 <include>*.dump</include>
92 <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/appc/data/stores</outputDirectory>
108 <directory>../src/main/stores</directory>
110 <include>*.jks</include>
111 <include>*.p12</include>
113 <filtering>false</filtering>
120 <id>copy-properties</id>
122 <goal>copy-resources</goal>
124 <phase>validate</phase>
126 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/properties</outputDirectory>
129 <directory>../src/main/properties</directory>
131 <include>*.properties</include>
133 <filtering>false</filtering>
141 <artifactId>exec-maven-plugin</artifactId>
142 <groupId>org.codehaus.mojo</groupId>
143 <version>1.5.0</version>
146 <id>Get features</id>
147 <phase>generate-sources</phase>
152 <executable>bash</executable>
153 <environmentVariables>
154 <APPC_VERSION>${appc.version}</APPC_VERSION>
155 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
156 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
157 </environmentVariables>
159 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
160 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
166 <id>change shell permissions</id>
167 <phase>process-sources</phase>
172 <executable>find</executable>
174 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
175 <argument>-name</argument>
176 <argument>*.sh</argument>
177 <argument>-exec</argument>
178 <argument>chmod</argument>
179 <argument>+x</argument>
180 <argument>{}</argument>
181 <argument>;</argument>
196 <groupId>org.codehaus.groovy.maven</groupId>
197 <artifactId>gmaven-plugin</artifactId>
200 <phase>validate</phase>
206 <ver>${project.version}</ver>
207 <timestamp>${maven.build.timestamp}</timestamp>
210 println project.properties['ver'];
212 if ( project.properties['ver'] != null ) {
213 versionArray = project.properties['ver'].split('\\.');
215 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
216 project.properties['dockertag1']=project.properties['ver'] + "-latest";
217 project.properties['dockertag2']="latest";
219 project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
220 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
222 println 'docker tag 1: ' + project.properties['dockertag1'];
223 println 'docker tag 2: ' + project.properties['dockertag2'];
230 <groupId>io.fabric8</groupId>
231 <artifactId>docker-maven-plugin</artifactId>
232 <version>0.16.5</version>
233 <inherited>false</inherited>
237 <name>${image.name}</name>
239 <cleanup>try</cleanup>
240 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
241 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
243 <tag>${dockertag1}</tag>
244 <tag>${dockertag2}</tag>
252 <id>generate-images</id>
253 <phase>package</phase>
261 <phase>deploy</phase>
270 <!-- This is to add any extra scripts, sql dump files, properties files
271 APPC may need even after inheriting from the sdnc base image -->
273 <artifactId>maven-resources-plugin</artifactId>
274 <version>2.6</version>
277 <id>copy-dockerfile</id>
279 <goal>copy-resources</goal>
280 </goals><!-- here the phase you need -->
281 <phase>validate</phase>
283 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
286 <directory>src/main/docker</directory>
288 <include>Dockerfile</include>
290 <filtering>true</filtering>
297 <id>copy-scripts</id>
299 <goal>copy-resources</goal>
300 </goals><!-- here the phase you need -->
301 <phase>validate</phase>
303 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/bin</outputDirectory>
306 <directory>src/main/scripts</directory>
308 <include>*.sh</include>
310 <filtering>false</filtering>
319 <goal>copy-resources</goal>
321 <phase>validate</phase>
323 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data</outputDirectory>
326 <directory>src/main/resources</directory>
328 <include>*.dump</include>
330 <filtering>false</filtering>
337 <id>copy-keystores</id>
339 <goal>copy-resources</goal>
341 <phase>validate</phase>
343 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/stores</outputDirectory>
346 <directory>../src/main/stores</directory>
348 <include>*.jks</include>
349 <include>*.p12</include>
351 <filtering>false</filtering>
358 <id>copy-properties</id>
360 <goal>copy-resources</goal>
362 <phase>validate</phase>
364 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/properties</outputDirectory>
367 <directory>../src/main/properties</directory>
369 <include>*.properties</include>
371 <filtering>false</filtering>
379 <artifactId>exec-maven-plugin</artifactId>
380 <groupId>org.codehaus.mojo</groupId>
381 <version>1.5.0</version>
384 <id>Get features</id>
385 <phase>generate-sources</phase>
390 <executable>bash</executable>
391 <environmentVariables>
392 <APPC_VERSION>${appc.version}</APPC_VERSION>
393 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
394 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
395 </environmentVariables>
397 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
398 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
404 <id>change shell permissions</id>
405 <phase>process-sources</phase>
410 <executable>find</executable>
412 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
413 <argument>-name</argument>
414 <argument>*.sh</argument>
415 <argument>-exec</argument>
416 <argument>chmod</argument>
417 <argument>+x</argument>
418 <argument>{}</argument>
419 <argument>;</argument>
432 <name>openECOMP</name>