1 <?xml version="1.0" encoding="UTF-8"?>
3 ============LICENSE_START==========================================
5 ===================================================================
6 Copyright (C) 2017-2019 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.8.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.8.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.7.1</appc.release.version>
44 <appc.snapshot.version>1.8.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>
49 <!--Determines the version of the cdt-proxy-service to download and install-->
50 <appc.cdt.version>1.7.1</appc.cdt.version>
51 <docker.plugin.version>0.28.0</docker.plugin.version>
58 <!-- This is to add any extra scripts, sql dump files, properties files APPC may need even after inheriting from the sdnc base image -->
60 <artifactId>maven-resources-plugin</artifactId>
61 <version>2.6</version>
64 <id>copy-dockerfile</id>
66 <goal>copy-resources</goal>
67 </goals><!-- here the phase you need -->
68 <phase>validate</phase>
70 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
73 <directory>src/main/docker</directory>
75 <include>Dockerfile</include>
77 <filtering>true</filtering>
86 <goal>copy-resources</goal>
87 </goals><!-- here the phase you need -->
88 <phase>validate</phase>
90 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/bin</outputDirectory>
93 <directory>src/main/scripts</directory>
95 <include>*.sh</include>
97 <filtering>false</filtering>
106 <goal>copy-resources</goal>
108 <phase>validate</phase>
110 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data</outputDirectory>
113 <directory>src/main/resources</directory>
115 <include>keystore</include>
116 <include>*.dump</include>
117 <include>*.sh</include>
118 <include>*.cfg</include>
119 <include>*.xml</include>
120 <include>*.json</include>
121 <include>*.properties</include>
123 <filtering>false</filtering>
130 <id>copy-keystores</id>
132 <goal>copy-resources</goal>
134 <phase>validate</phase>
136 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/stores</outputDirectory>
139 <directory>../src/main/stores</directory>
141 <include>*.jks</include>
142 <include>*.p12</include>
143 <include>*keyfile</include>
145 <filtering>false</filtering>
152 <id>copy-properties</id>
154 <goal>copy-resources</goal>
156 <phase>validate</phase>
158 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/properties</outputDirectory>
161 <directory>../src/main/properties</directory>
163 <include>*.properties</include>
164 <include>*.csv</include>
166 <filtering>false</filtering>
174 <artifactId>exec-maven-plugin</artifactId>
175 <groupId>org.codehaus.mojo</groupId>
176 <version>1.5.0</version>
179 <id>Get features</id>
180 <phase>generate-sources</phase>
185 <executable>bash</executable>
186 <environmentVariables>
187 <APPC_VERSION>${appc.version}</APPC_VERSION>
188 <APPC_CDT_VERSION>${appc.cdt.version}</APPC_CDT_VERSION>
189 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
190 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
191 </environmentVariables>
193 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
194 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
200 <id>change shell permissions</id>
201 <phase>process-sources</phase>
206 <executable>find</executable>
208 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
209 <argument>-name</argument>
210 <argument>*.sh</argument>
211 <argument>-exec</argument>
212 <argument>chmod</argument>
213 <argument>+x</argument>
214 <argument>{}</argument>
215 <argument>;</argument>
230 <groupId>org.codehaus.groovy.maven</groupId>
231 <artifactId>gmaven-plugin</artifactId>
234 <phase>validate</phase>
240 <ver>${project.version}</ver>
241 <timestamp>${maven.build.timestamp}</timestamp>
244 println project.properties['ver'];
246 if ( project.properties['ver'] != null ) {
247 versionArray = project.properties['ver'].split('\\.');
249 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
250 project.properties['dockertag1']=project.properties['ver'] + "-latest";
251 project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp'];
252 project.properties['appc.version']=project.properties['appc.snapshot.version'];
254 project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
255 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
256 project.properties['appc.version']=project.properties['appc.release.version'];
258 println 'docker tag 1: ' + project.properties['dockertag1'];
259 println 'docker tag 2: ' + project.properties['dockertag2'];
266 <groupId>io.fabric8</groupId>
267 <artifactId>docker-maven-plugin</artifactId>
268 <version>${docker.plugin.version}</version>
269 <inherited>false</inherited>
273 <name>${image.name}</name>
275 <cleanup>try</cleanup>
276 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
277 <dockerFile>Dockerfile</dockerFile>
279 <tag>${dockertag1}</tag>
280 <tag>${dockertag2}</tag>
288 <id>generate-images</id>
289 <phase>package</phase>
297 <phase>deploy</phase>
306 <!-- This is to add any extra scripts, sql dump files, properties files
307 APPC may need even after inheriting from the sdnc base image -->
309 <artifactId>maven-resources-plugin</artifactId>
310 <version>2.6</version>
313 <id>copy-dockerfile</id>
315 <goal>copy-resources</goal>
316 </goals><!-- here the phase you need -->
317 <phase>validate</phase>
319 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
322 <directory>src/main/docker</directory>
324 <include>Dockerfile</include>
326 <filtering>true</filtering>
333 <id>copy-scripts</id>
335 <goal>copy-resources</goal>
336 </goals><!-- here the phase you need -->
337 <phase>validate</phase>
339 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/bin</outputDirectory>
342 <directory>src/main/scripts</directory>
344 <include>*.sh</include>
346 <filtering>false</filtering>
355 <goal>copy-resources</goal>
357 <phase>validate</phase>
359 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data</outputDirectory>
362 <directory>src/main/resources</directory>
364 <include>keystore</include>
365 <include>*.dump</include>
366 <include>*.sh</include>
367 <include>*.cfg</include>
368 <include>*.xml</include>
369 <include>*.json</include>
370 <include>*.properties</include>
372 <filtering>false</filtering>
379 <id>copy-keystores</id>
381 <goal>copy-resources</goal>
383 <phase>validate</phase>
385 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/stores</outputDirectory>
388 <directory>../src/main/stores</directory>
390 <include>*.jks</include>
391 <include>*.p12</include>
392 <include>*.keyfile</include>
394 <filtering>false</filtering>
401 <id>copy-properties</id>
403 <goal>copy-resources</goal>
405 <phase>validate</phase>
407 <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/properties</outputDirectory>
410 <directory>../src/main/properties</directory>
412 <include>*.properties</include>
413 <include>*.csv</include>
415 <filtering>false</filtering>
423 <artifactId>exec-maven-plugin</artifactId>
424 <groupId>org.codehaus.mojo</groupId>
425 <version>1.5.0</version>
428 <id>Get features</id>
429 <phase>generate-sources</phase>
434 <executable>bash</executable>
435 <environmentVariables>
436 <APPC_VERSION>${appc.version}</APPC_VERSION>
437 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
438 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
439 </environmentVariables>
441 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
442 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
443 <argument>${basedir}/target/docker-stage</argument>
449 <id>change shell permissions</id>
450 <phase>process-sources</phase>
455 <executable>find</executable>
457 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
458 <argument>-name</argument>
459 <argument>*.sh</argument>
460 <argument>-exec</argument>
461 <argument>chmod</argument>
462 <argument>+x</argument>
463 <argument>{}</argument>
464 <argument>;</argument>