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.2.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.2.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>
91 <include>*.sh</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>
320 <goal>copy-resources</goal>
322 <phase>validate</phase>
324 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data</outputDirectory>
327 <directory>src/main/resources</directory>
329 <include>*.dump</include>
330 <include>*.sh</include>
332 <filtering>false</filtering>
339 <id>copy-keystores</id>
341 <goal>copy-resources</goal>
343 <phase>validate</phase>
345 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/stores</outputDirectory>
348 <directory>../src/main/stores</directory>
350 <include>*.jks</include>
351 <include>*.p12</include>
353 <filtering>false</filtering>
360 <id>copy-properties</id>
362 <goal>copy-resources</goal>
364 <phase>validate</phase>
366 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/properties</outputDirectory>
369 <directory>../src/main/properties</directory>
371 <include>*.properties</include>
373 <filtering>false</filtering>
381 <artifactId>exec-maven-plugin</artifactId>
382 <groupId>org.codehaus.mojo</groupId>
383 <version>1.5.0</version>
386 <id>Get features</id>
387 <phase>generate-sources</phase>
392 <executable>bash</executable>
393 <environmentVariables>
394 <APPC_VERSION>${appc.version}</APPC_VERSION>
395 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
396 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
397 </environmentVariables>
399 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
400 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
406 <id>change shell permissions</id>
407 <phase>process-sources</phase>
412 <executable>find</executable>
414 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
415 <argument>-name</argument>
416 <argument>*.sh</argument>
417 <argument>-exec</argument>
418 <argument>chmod</argument>
419 <argument>+x</argument>
420 <argument>{}</argument>
421 <argument>;</argument>
434 <name>openECOMP</name>