1 <?xml version="1.0" encoding="UTF-8"?>
3 ============LICENSE_START==========================================
5 ===================================================================
6 Copyright (C) 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 ============LICENSE_END============================================
24 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
28 <groupId>org.onap.appc.deployment</groupId>
29 <artifactId>appc-docker-project</artifactId>
30 <version>1.6.1-SNAPSHOT</version>
33 <modelVersion>4.0.0</modelVersion>
34 <packaging>pom</packaging>
35 <groupId>org.onap.appc.deployment</groupId>
36 <artifactId>installation-cdt</artifactId>
37 <version>1.6.1-SNAPSHOT</version>
39 <name>Installation - CDT Docker</name>
40 <description>Creates APPC CDT Docker container</description>
43 <image.name>onap/appc-cdt-image</image.name>
44 <appc.release.version>1.6.1</appc.release.version>
45 <appc.snapshot.version>1.6.1-SNAPSHOT</appc.snapshot.version>
46 <!--This version will be over-ridden by jenkins
47 injecting the version.properties variable file during docker build-->
48 <appc.docker.staging.version>1.0.0</appc.docker.staging.version>
49 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
56 <!-- This is to add any extra scripts, sql dump files, properties files APPC may need even after inheriting from the sdnc base image -->
58 <artifactId>maven-resources-plugin</artifactId>
59 <version>2.6</version>
62 <id>copy-dockerfile</id>
64 <goal>copy-resources</goal>
65 </goals><!-- here the phase you need -->
66 <phase>validate</phase>
68 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
71 <directory>src/main/docker</directory>
73 <include>Dockerfile</include>
75 <filtering>true</filtering>
83 <goal>copy-resources</goal>
85 <phase>validate</phase>
87 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
90 <directory>src/main/scripts</directory>
92 <include>*.sh</include>
94 <filtering>false</filtering>
100 <id>copy-resources</id>
102 <goal>copy-resources</goal>
104 <phase>validate</phase>
106 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
109 <directory>src/main/resources</directory>
111 <include>nginx.conf</include>
113 <filtering>false</filtering>
121 <goal>copy-resources</goal>
123 <phase>validate</phase>
125 <outputDirectory>${basedir}/target/docker-stage/cert</outputDirectory>
128 <directory>src/main/resources/cert</directory>
130 <include>*.pem</include>
132 <filtering>false</filtering>
140 <artifactId>exec-maven-plugin</artifactId>
141 <groupId>org.codehaus.mojo</groupId>
142 <version>1.5.0</version>
145 <id>Get features</id>
146 <phase>generate-sources</phase>
151 <executable>bash</executable>
152 <environmentVariables>
153 <APPC_VERSION>${appc.version}</APPC_VERSION>
154 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
155 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
156 </environmentVariables>
158 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
159 <argument>${basedir}/target/docker-stage</argument>
175 <groupId>org.codehaus.groovy.maven</groupId>
176 <artifactId>gmaven-plugin</artifactId>
179 <phase>validate</phase>
185 <ver>${project.version}</ver>
186 <timestamp>${maven.build.timestamp}</timestamp>
189 println project.properties['ver'];
191 if ( project.properties['ver'] != null ) {
192 versionArray = project.properties['ver'].split('\\.');
194 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
195 project.properties['dockertag1']=project.properties['ver'] + "-latest";
196 project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp'];
197 project.properties['appc.version']=project.properties['appc.snapshot.version'];
199 project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
200 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
201 project.properties['appc.version']=project.properties['appc.release.version'];
203 println 'docker tag 1: ' + project.properties['dockertag1'];
204 println 'docker tag 2: ' + project.properties['dockertag2'];
211 <groupId>io.fabric8</groupId>
212 <artifactId>docker-maven-plugin</artifactId>
213 <version>0.28.0</version>
214 <inherited>false</inherited>
218 <name>${image.name}</name>
220 <cleanup>try</cleanup>
221 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
222 <dockerFile>Dockerfile</dockerFile>
224 <tag>${dockertag1}</tag>
225 <tag>${dockertag2}</tag>
233 <id>generate-images</id>
234 <phase>package</phase>
242 <phase>deploy</phase>
251 <!-- This is to add any extra scripts, sql dump files, properties files
252 APPC may need even after inheriting from the sdnc base image -->
254 <artifactId>maven-resources-plugin</artifactId>
255 <version>2.6</version>
258 <id>copy-dockerfile</id>
260 <goal>copy-resources</goal>
261 </goals><!-- here the phase you need -->
262 <phase>validate</phase>
264 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
267 <directory>src/main/docker</directory>
269 <include>Dockerfile</include>
271 <filtering>true</filtering>
277 <id>copy-scripts</id>
279 <goal>copy-resources</goal>
281 <phase>validate</phase>
283 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
286 <directory>src/main/scripts</directory>
288 <include>*.sh</include>
290 <filtering>false</filtering>
298 <artifactId>exec-maven-plugin</artifactId>
299 <groupId>org.codehaus.mojo</groupId>
300 <version>1.5.0</version>
303 <id>Get features</id>
304 <phase>generate-sources</phase>
309 <executable>bash</executable>
310 <environmentVariables>
311 <APPC_VERSION>${appc.version}</APPC_VERSION>
312 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
313 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
314 </environmentVariables>
316 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
317 <argument>${basedir}/target/docker-stage</argument>
318 <argument>${basedir}/target/docker-stage</argument>