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>
93 <include>*.cfg</include>
95 <filtering>false</filtering>
102 <id>copy-keystores</id>
104 <goal>copy-resources</goal>
106 <phase>validate</phase>
108 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/stores</outputDirectory>
111 <directory>../src/main/stores</directory>
113 <include>*.jks</include>
114 <include>*.p12</include>
116 <filtering>false</filtering>
123 <id>copy-properties</id>
125 <goal>copy-resources</goal>
127 <phase>validate</phase>
129 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/properties</outputDirectory>
132 <directory>../src/main/properties</directory>
134 <include>*.properties</include>
136 <filtering>false</filtering>
144 <artifactId>exec-maven-plugin</artifactId>
145 <groupId>org.codehaus.mojo</groupId>
146 <version>1.5.0</version>
149 <id>Get features</id>
150 <phase>generate-sources</phase>
155 <executable>bash</executable>
156 <environmentVariables>
157 <APPC_VERSION>${appc.version}</APPC_VERSION>
158 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
159 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
160 </environmentVariables>
162 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
163 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
169 <id>change shell permissions</id>
170 <phase>process-sources</phase>
175 <executable>find</executable>
177 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
178 <argument>-name</argument>
179 <argument>*.sh</argument>
180 <argument>-exec</argument>
181 <argument>chmod</argument>
182 <argument>+x</argument>
183 <argument>{}</argument>
184 <argument>;</argument>
199 <groupId>org.codehaus.groovy.maven</groupId>
200 <artifactId>gmaven-plugin</artifactId>
203 <phase>validate</phase>
209 <ver>${project.version}</ver>
210 <timestamp>${maven.build.timestamp}</timestamp>
213 println project.properties['ver'];
215 if ( project.properties['ver'] != null ) {
216 versionArray = project.properties['ver'].split('\\.');
218 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
219 project.properties['dockertag1']=project.properties['ver'] + "-latest";
220 project.properties['dockertag2']="latest";
221 project.properties['appc.version']=project.properties['appc.snapshot.version'];
223 project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
224 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
225 project.properties['appc.version']=project.properties['appc.release.version'];
227 println 'docker tag 1: ' + project.properties['dockertag1'];
228 println 'docker tag 2: ' + project.properties['dockertag2'];
235 <groupId>io.fabric8</groupId>
236 <artifactId>docker-maven-plugin</artifactId>
237 <version>0.16.5</version>
238 <inherited>false</inherited>
242 <name>${image.name}</name>
244 <cleanup>try</cleanup>
245 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
246 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
248 <tag>${dockertag1}</tag>
249 <tag>${dockertag2}</tag>
257 <id>generate-images</id>
258 <phase>package</phase>
266 <phase>deploy</phase>
275 <!-- This is to add any extra scripts, sql dump files, properties files
276 APPC may need even after inheriting from the sdnc base image -->
278 <artifactId>maven-resources-plugin</artifactId>
279 <version>2.6</version>
282 <id>copy-dockerfile</id>
284 <goal>copy-resources</goal>
285 </goals><!-- here the phase you need -->
286 <phase>validate</phase>
288 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
291 <directory>src/main/docker</directory>
293 <include>Dockerfile</include>
295 <filtering>true</filtering>
302 <id>copy-scripts</id>
304 <goal>copy-resources</goal>
305 </goals><!-- here the phase you need -->
306 <phase>validate</phase>
308 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/bin</outputDirectory>
311 <directory>src/main/scripts</directory>
313 <include>*.sh</include>
315 <filtering>false</filtering>
324 <goal>copy-resources</goal>
326 <phase>validate</phase>
328 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data</outputDirectory>
331 <directory>src/main/resources</directory>
333 <include>*.dump</include>
334 <include>*.sh</include>
335 <include>*.cfg</include>
337 <filtering>false</filtering>
344 <id>copy-keystores</id>
346 <goal>copy-resources</goal>
348 <phase>validate</phase>
350 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/stores</outputDirectory>
353 <directory>../src/main/stores</directory>
355 <include>*.jks</include>
356 <include>*.p12</include>
358 <filtering>false</filtering>
365 <id>copy-properties</id>
367 <goal>copy-resources</goal>
369 <phase>validate</phase>
371 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/properties</outputDirectory>
374 <directory>../src/main/properties</directory>
376 <include>*.properties</include>
378 <filtering>false</filtering>
386 <artifactId>exec-maven-plugin</artifactId>
387 <groupId>org.codehaus.mojo</groupId>
388 <version>1.5.0</version>
391 <id>Get features</id>
392 <phase>generate-sources</phase>
397 <executable>bash</executable>
398 <environmentVariables>
399 <APPC_VERSION>${appc.version}</APPC_VERSION>
400 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
401 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
402 </environmentVariables>
404 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
405 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
406 <argument>${basedir}/target/docker-stage</argument>
412 <id>change shell permissions</id>
413 <phase>process-sources</phase>
418 <executable>find</executable>
420 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
421 <argument>-name</argument>
422 <argument>*.sh</argument>
423 <argument>-exec</argument>
424 <argument>chmod</argument>
425 <argument>+x</argument>
426 <argument>{}</argument>
427 <argument>;</argument>