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.
22 ECOMP is a trademark and service mark of AT&T Intellectual Property.
23 ============LICENSE_END============================================
25 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
26 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
29 <groupId>org.onap.appc.deployment</groupId>
30 <artifactId>installation</artifactId>
31 <version>1.3.0-SNAPSHOT</version>
34 <modelVersion>4.0.0</modelVersion>
35 <packaging>pom</packaging>
36 <groupId>org.onap.appc.deployment</groupId>
37 <artifactId>installation-appc</artifactId>
38 <version>1.3.0-SNAPSHOT</version>
40 <name>Installation - APPC Docker</name>
41 <description>Creates APPC Docker container on top of the SDNC Base Docker Image</description>
44 <image.name>onap/appc-image</image.name>
45 <appc.release.version>1.3.0</appc.release.version>
46 <appc.snapshot.version>1.3.0-SNAPSHOT</appc.snapshot.version>
47 <!--This version will be over-ridden by jenkins
48 injecting the version.properties variable file during docker build-->
49 <appc.docker.staging.version>1.0.0</appc.docker.staging.version>
50 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
57 <!-- This is to add any extra scripts, sql dump files, properties files APPC may need even after inheriting from the sdnc base image -->
59 <artifactId>maven-resources-plugin</artifactId>
60 <version>2.6</version>
63 <id>copy-dockerfile</id>
65 <goal>copy-resources</goal>
66 </goals><!-- here the phase you need -->
67 <phase>validate</phase>
69 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
72 <directory>src/main/docker</directory>
74 <include>Dockerfile</include>
76 <filtering>true</filtering>
85 <goal>copy-resources</goal>
86 </goals><!-- here the phase you need -->
87 <phase>validate</phase>
89 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/bin</outputDirectory>
92 <directory>src/main/scripts</directory>
94 <include>*.sh</include>
96 <filtering>false</filtering>
105 <goal>copy-resources</goal>
107 <phase>validate</phase>
109 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data</outputDirectory>
112 <directory>src/main/resources</directory>
114 <include>*.dump</include>
115 <include>*.sh</include>
116 <include>*.cfg</include>
118 <filtering>false</filtering>
125 <id>copy-keystores</id>
127 <goal>copy-resources</goal>
129 <phase>validate</phase>
131 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/stores</outputDirectory>
134 <directory>../src/main/stores</directory>
136 <include>*.jks</include>
137 <include>*.p12</include>
139 <filtering>false</filtering>
146 <id>copy-properties</id>
148 <goal>copy-resources</goal>
150 <phase>validate</phase>
152 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/properties</outputDirectory>
155 <directory>../src/main/properties</directory>
157 <include>*.properties</include>
159 <filtering>false</filtering>
167 <artifactId>exec-maven-plugin</artifactId>
168 <groupId>org.codehaus.mojo</groupId>
169 <version>1.5.0</version>
172 <id>Get features</id>
173 <phase>generate-sources</phase>
178 <executable>bash</executable>
179 <environmentVariables>
180 <APPC_VERSION>${appc.version}</APPC_VERSION>
181 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
182 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
183 </environmentVariables>
185 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
186 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
192 <id>change shell permissions</id>
193 <phase>process-sources</phase>
198 <executable>find</executable>
200 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
201 <argument>-name</argument>
202 <argument>*.sh</argument>
203 <argument>-exec</argument>
204 <argument>chmod</argument>
205 <argument>+x</argument>
206 <argument>{}</argument>
207 <argument>;</argument>
222 <groupId>org.codehaus.groovy.maven</groupId>
223 <artifactId>gmaven-plugin</artifactId>
226 <phase>validate</phase>
232 <ver>${project.version}</ver>
233 <timestamp>${maven.build.timestamp}</timestamp>
236 println project.properties['ver'];
238 if ( project.properties['ver'] != null ) {
239 versionArray = project.properties['ver'].split('\\.');
241 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
242 project.properties['dockertag1']=project.properties['ver'] + "-latest";
243 project.properties['dockertag2']="latest";
244 project.properties['appc.version']=project.properties['appc.snapshot.version'];
246 project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
247 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
248 project.properties['appc.version']=project.properties['appc.release.version'];
250 println 'docker tag 1: ' + project.properties['dockertag1'];
251 println 'docker tag 2: ' + project.properties['dockertag2'];
258 <groupId>io.fabric8</groupId>
259 <artifactId>docker-maven-plugin</artifactId>
260 <version>0.16.5</version>
261 <inherited>false</inherited>
265 <name>${image.name}</name>
267 <cleanup>try</cleanup>
268 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
269 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
271 <tag>${dockertag1}</tag>
272 <tag>${dockertag2}</tag>
280 <id>generate-images</id>
281 <phase>package</phase>
289 <phase>deploy</phase>
298 <!-- This is to add any extra scripts, sql dump files, properties files
299 APPC may need even after inheriting from the sdnc base image -->
301 <artifactId>maven-resources-plugin</artifactId>
302 <version>2.6</version>
305 <id>copy-dockerfile</id>
307 <goal>copy-resources</goal>
308 </goals><!-- here the phase you need -->
309 <phase>validate</phase>
311 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
314 <directory>src/main/docker</directory>
316 <include>Dockerfile</include>
318 <filtering>true</filtering>
325 <id>copy-scripts</id>
327 <goal>copy-resources</goal>
328 </goals><!-- here the phase you need -->
329 <phase>validate</phase>
331 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/bin</outputDirectory>
334 <directory>src/main/scripts</directory>
336 <include>*.sh</include>
338 <filtering>false</filtering>
347 <goal>copy-resources</goal>
349 <phase>validate</phase>
351 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data</outputDirectory>
354 <directory>src/main/resources</directory>
356 <include>*.dump</include>
357 <include>*.sh</include>
358 <include>*.cfg</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>