1 <?xml version="1.0" encoding="UTF-8"?>
3 ============LICENSE_START==========================================
5 ===================================================================
6 Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
7 ===================================================================
9 Unless otherwise specified, all software contained herein is licensed
10 under the Apache License, Version 2.0 (the License);
11 you may not use this software except in compliance with the License.
12 You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
21 ============LICENSE_END============================================
23 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
27 <groupId>org.onap.appc.deployment</groupId>
28 <artifactId>installation</artifactId>
29 <version>1.3.0-SNAPSHOT</version>
32 <modelVersion>4.0.0</modelVersion>
33 <packaging>pom</packaging>
34 <groupId>org.onap.appc.deployment</groupId>
35 <artifactId>installation-appc</artifactId>
36 <version>1.3.0-SNAPSHOT</version>
38 <name>Installation - APPC Docker</name>
39 <description>Creates APPC Docker container on top of the SDNC Base Docker Image</description>
42 <image.name>onap/appc-image</image.name>
43 <appc.release.version>1.3.0</appc.release.version>
44 <appc.snapshot.version>1.3.0-SNAPSHOT</appc.snapshot.version>
45 <!--This version will be over-ridden by jenkins
46 injecting the version.properties variable file during docker build-->
47 <appc.docker.staging.version>1.0.0</appc.docker.staging.version>
48 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
55 <!-- This is to add any extra scripts, sql dump files, properties files APPC may need even after inheriting from the sdnc base image -->
57 <artifactId>maven-resources-plugin</artifactId>
58 <version>2.6</version>
61 <id>copy-dockerfile</id>
63 <goal>copy-resources</goal>
64 </goals><!-- here the phase you need -->
65 <phase>validate</phase>
67 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
70 <directory>src/main/docker</directory>
72 <include>Dockerfile</include>
74 <filtering>true</filtering>
83 <goal>copy-resources</goal>
84 </goals><!-- here the phase you need -->
85 <phase>validate</phase>
87 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/bin</outputDirectory>
90 <directory>src/main/scripts</directory>
92 <include>*.sh</include>
94 <filtering>false</filtering>
103 <goal>copy-resources</goal>
105 <phase>validate</phase>
107 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data</outputDirectory>
110 <directory>src/main/resources</directory>
112 <include>*.dump</include>
113 <include>*.sh</include>
114 <include>*.cfg</include>
115 <include>*.ini</include>
117 <filtering>false</filtering>
124 <id>copy-keystores</id>
126 <goal>copy-resources</goal>
128 <phase>validate</phase>
130 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/stores</outputDirectory>
133 <directory>../src/main/stores</directory>
135 <include>*.jks</include>
136 <include>*.p12</include>
138 <filtering>false</filtering>
145 <id>copy-properties</id>
147 <goal>copy-resources</goal>
149 <phase>validate</phase>
151 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/properties</outputDirectory>
154 <directory>../src/main/properties</directory>
156 <include>*.properties</include>
158 <filtering>false</filtering>
166 <artifactId>exec-maven-plugin</artifactId>
167 <groupId>org.codehaus.mojo</groupId>
168 <version>1.5.0</version>
171 <id>Get features</id>
172 <phase>generate-sources</phase>
177 <executable>bash</executable>
178 <environmentVariables>
179 <APPC_VERSION>${appc.version}</APPC_VERSION>
180 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
181 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
182 </environmentVariables>
184 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
185 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
191 <id>change shell permissions</id>
192 <phase>process-sources</phase>
197 <executable>find</executable>
199 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
200 <argument>-name</argument>
201 <argument>*.sh</argument>
202 <argument>-exec</argument>
203 <argument>chmod</argument>
204 <argument>+x</argument>
205 <argument>{}</argument>
206 <argument>;</argument>
221 <groupId>org.codehaus.groovy.maven</groupId>
222 <artifactId>gmaven-plugin</artifactId>
225 <phase>validate</phase>
231 <ver>${project.version}</ver>
232 <timestamp>${maven.build.timestamp}</timestamp>
235 println project.properties['ver'];
237 if ( project.properties['ver'] != null ) {
238 versionArray = project.properties['ver'].split('\\.');
240 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
241 project.properties['dockertag1']=project.properties['ver'] + "-latest";
242 project.properties['dockertag2']="latest";
243 project.properties['appc.version']=project.properties['appc.snapshot.version'];
245 project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
246 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
247 project.properties['appc.version']=project.properties['appc.release.version'];
249 println 'docker tag 1: ' + project.properties['dockertag1'];
250 println 'docker tag 2: ' + project.properties['dockertag2'];
257 <groupId>io.fabric8</groupId>
258 <artifactId>docker-maven-plugin</artifactId>
259 <version>0.16.5</version>
260 <inherited>false</inherited>
264 <name>${image.name}</name>
266 <cleanup>try</cleanup>
267 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
268 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
270 <tag>${dockertag1}</tag>
271 <tag>${dockertag2}</tag>
279 <id>generate-images</id>
280 <phase>package</phase>
288 <phase>deploy</phase>
297 <!-- This is to add any extra scripts, sql dump files, properties files
298 APPC may need even after inheriting from the sdnc base image -->
300 <artifactId>maven-resources-plugin</artifactId>
301 <version>2.6</version>
304 <id>copy-dockerfile</id>
306 <goal>copy-resources</goal>
307 </goals><!-- here the phase you need -->
308 <phase>validate</phase>
310 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
313 <directory>src/main/docker</directory>
315 <include>Dockerfile</include>
317 <filtering>true</filtering>
324 <id>copy-scripts</id>
326 <goal>copy-resources</goal>
327 </goals><!-- here the phase you need -->
328 <phase>validate</phase>
330 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/bin</outputDirectory>
333 <directory>src/main/scripts</directory>
335 <include>*.sh</include>
337 <filtering>false</filtering>
346 <goal>copy-resources</goal>
348 <phase>validate</phase>
350 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data</outputDirectory>
353 <directory>src/main/resources</directory>
355 <include>*.dump</include>
356 <include>*.sh</include>
357 <include>*.cfg</include>
358 <include>*.ini</include>
360 <filtering>false</filtering>
367 <id>copy-keystores</id>
369 <goal>copy-resources</goal>
371 <phase>validate</phase>
373 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/stores</outputDirectory>
376 <directory>../src/main/stores</directory>
378 <include>*.jks</include>
379 <include>*.p12</include>
381 <filtering>false</filtering>
388 <id>copy-properties</id>
390 <goal>copy-resources</goal>
392 <phase>validate</phase>
394 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/properties</outputDirectory>
397 <directory>../src/main/properties</directory>
399 <include>*.properties</include>
401 <filtering>false</filtering>
409 <artifactId>exec-maven-plugin</artifactId>
410 <groupId>org.codehaus.mojo</groupId>
411 <version>1.5.0</version>
414 <id>Get features</id>
415 <phase>generate-sources</phase>
420 <executable>bash</executable>
421 <environmentVariables>
422 <APPC_VERSION>${appc.version}</APPC_VERSION>
423 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
424 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
425 </environmentVariables>
427 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
428 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
429 <argument>${basedir}/target/docker-stage</argument>
435 <id>change shell permissions</id>
436 <phase>process-sources</phase>
441 <executable>find</executable>
443 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
444 <argument>-name</argument>
445 <argument>*.sh</argument>
446 <argument>-exec</argument>
447 <argument>chmod</argument>
448 <argument>+x</argument>
449 <argument>{}</argument>
450 <argument>;</argument>