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.onap.appc.deployment</groupId>
7 <artifactId>installation</artifactId>
8 <version>1.3.0-SNAPSHOT</version>
11 <modelVersion>4.0.0</modelVersion>
12 <packaging>pom</packaging>
13 <groupId>org.onap.appc.deployment</groupId>
14 <artifactId>installation-appc</artifactId>
15 <version>1.3.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>onap/appc-image</image.name>
22 <appc.release.version>1.3.0</appc.release.version>
23 <appc.snapshot.version>1.3.0-SNAPSHOT</appc.snapshot.version>
24 <!--This version will be over-ridden by jenkins
25 injecting the version.properties variable file during docker build-->
26 <appc.docker.staging.version>1.0.0</appc.docker.staging.version>
27 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
34 <!-- This is to add any extra scripts, sql dump files, properties files APPC may need even after inheriting from the sdnc base image -->
36 <artifactId>maven-resources-plugin</artifactId>
37 <version>2.6</version>
40 <id>copy-dockerfile</id>
42 <goal>copy-resources</goal>
43 </goals><!-- here the phase you need -->
44 <phase>validate</phase>
46 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
49 <directory>src/main/docker</directory>
51 <include>Dockerfile</include>
53 <filtering>true</filtering>
62 <goal>copy-resources</goal>
63 </goals><!-- here the phase you need -->
64 <phase>validate</phase>
66 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/bin</outputDirectory>
69 <directory>src/main/scripts</directory>
71 <include>*.sh</include>
73 <filtering>false</filtering>
82 <goal>copy-resources</goal>
84 <phase>validate</phase>
86 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data</outputDirectory>
89 <directory>src/main/resources</directory>
91 <include>*.dump</include>
92 <include>*.sh</include>
94 <filtering>false</filtering>
101 <id>copy-keystores</id>
103 <goal>copy-resources</goal>
105 <phase>validate</phase>
107 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/stores</outputDirectory>
110 <directory>../src/main/stores</directory>
112 <include>*.jks</include>
113 <include>*.p12</include>
115 <filtering>false</filtering>
122 <id>copy-properties</id>
124 <goal>copy-resources</goal>
126 <phase>validate</phase>
128 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/properties</outputDirectory>
131 <directory>../src/main/properties</directory>
133 <include>*.properties</include>
135 <filtering>false</filtering>
143 <artifactId>exec-maven-plugin</artifactId>
144 <groupId>org.codehaus.mojo</groupId>
145 <version>1.5.0</version>
148 <id>Get features</id>
149 <phase>generate-sources</phase>
154 <executable>bash</executable>
155 <environmentVariables>
156 <APPC_VERSION>${appc.version}</APPC_VERSION>
157 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
158 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
159 </environmentVariables>
161 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
162 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
168 <id>change shell permissions</id>
169 <phase>process-sources</phase>
174 <executable>find</executable>
176 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
177 <argument>-name</argument>
178 <argument>*.sh</argument>
179 <argument>-exec</argument>
180 <argument>chmod</argument>
181 <argument>+x</argument>
182 <argument>{}</argument>
183 <argument>;</argument>
198 <groupId>org.codehaus.groovy.maven</groupId>
199 <artifactId>gmaven-plugin</artifactId>
202 <phase>validate</phase>
208 <ver>${project.version}</ver>
209 <timestamp>${maven.build.timestamp}</timestamp>
212 println project.properties['ver'];
214 if ( project.properties['ver'] != null ) {
215 versionArray = project.properties['ver'].split('\\.');
217 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
218 project.properties['dockertag1']=project.properties['ver'] + "-latest";
219 project.properties['dockertag2']="latest";
220 project.properties['appc.version']=project.properties['appc.snapshot.version'];
222 project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
223 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
224 project.properties['appc.version']=project.properties['appc.release.version'];
226 println 'docker tag 1: ' + project.properties['dockertag1'];
227 println 'docker tag 2: ' + project.properties['dockertag2'];
234 <groupId>io.fabric8</groupId>
235 <artifactId>docker-maven-plugin</artifactId>
236 <version>0.16.5</version>
237 <inherited>false</inherited>
241 <name>${image.name}</name>
243 <cleanup>try</cleanup>
244 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
245 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
247 <tag>${dockertag1}</tag>
248 <tag>${dockertag2}</tag>
256 <id>generate-images</id>
257 <phase>package</phase>
265 <phase>deploy</phase>
274 <!-- This is to add any extra scripts, sql dump files, properties files
275 APPC may need even after inheriting from the sdnc base image -->
277 <artifactId>maven-resources-plugin</artifactId>
278 <version>2.6</version>
281 <id>copy-dockerfile</id>
283 <goal>copy-resources</goal>
284 </goals><!-- here the phase you need -->
285 <phase>validate</phase>
287 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
290 <directory>src/main/docker</directory>
292 <include>Dockerfile</include>
294 <filtering>true</filtering>
301 <id>copy-scripts</id>
303 <goal>copy-resources</goal>
304 </goals><!-- here the phase you need -->
305 <phase>validate</phase>
307 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/bin</outputDirectory>
310 <directory>src/main/scripts</directory>
312 <include>*.sh</include>
314 <filtering>false</filtering>
323 <goal>copy-resources</goal>
325 <phase>validate</phase>
327 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data</outputDirectory>
330 <directory>src/main/resources</directory>
332 <include>*.dump</include>
333 <include>*.sh</include>
335 <filtering>false</filtering>
342 <id>copy-keystores</id>
344 <goal>copy-resources</goal>
346 <phase>validate</phase>
348 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/stores</outputDirectory>
351 <directory>../src/main/stores</directory>
353 <include>*.jks</include>
354 <include>*.p12</include>
356 <filtering>false</filtering>
363 <id>copy-properties</id>
365 <goal>copy-resources</goal>
367 <phase>validate</phase>
369 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/properties</outputDirectory>
372 <directory>../src/main/properties</directory>
374 <include>*.properties</include>
376 <filtering>false</filtering>
384 <artifactId>exec-maven-plugin</artifactId>
385 <groupId>org.codehaus.mojo</groupId>
386 <version>1.5.0</version>
389 <id>Get features</id>
390 <phase>generate-sources</phase>
395 <executable>bash</executable>
396 <environmentVariables>
397 <APPC_VERSION>${appc.version}</APPC_VERSION>
398 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
399 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
400 </environmentVariables>
402 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
403 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
409 <id>change shell permissions</id>
410 <phase>process-sources</phase>
415 <executable>find</executable>
417 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
418 <argument>-name</argument>
419 <argument>*.sh</argument>
420 <argument>-exec</argument>
421 <argument>chmod</argument>
422 <argument>+x</argument>
423 <argument>{}</argument>
424 <argument>;</argument>