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.4.0-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.4.0-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.4.0</appc.release.version>
45 <appc.snapshot.version>1.4.0-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>
102 <artifactId>exec-maven-plugin</artifactId>
103 <groupId>org.codehaus.mojo</groupId>
104 <version>1.5.0</version>
107 <id>Get features</id>
108 <phase>generate-sources</phase>
113 <executable>bash</executable>
114 <environmentVariables>
115 <APPC_VERSION>${appc.version}</APPC_VERSION>
116 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
117 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
118 </environmentVariables>
120 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
121 <argument>${basedir}/target/docker-stage</argument>
137 <groupId>org.codehaus.groovy.maven</groupId>
138 <artifactId>gmaven-plugin</artifactId>
141 <phase>validate</phase>
147 <ver>${project.version}</ver>
148 <timestamp>${maven.build.timestamp}</timestamp>
151 println project.properties['ver'];
153 if ( project.properties['ver'] != null ) {
154 versionArray = project.properties['ver'].split('\\.');
156 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
157 project.properties['dockertag1']=project.properties['ver'] + "-latest";
158 project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp'];
159 project.properties['appc.version']=project.properties['appc.snapshot.version'];
161 project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
162 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
163 project.properties['appc.version']=project.properties['appc.release.version'];
165 println 'docker tag 1: ' + project.properties['dockertag1'];
166 println 'docker tag 2: ' + project.properties['dockertag2'];
173 <groupId>io.fabric8</groupId>
174 <artifactId>docker-maven-plugin</artifactId>
175 <version>0.16.5</version>
176 <inherited>false</inherited>
180 <name>${image.name}</name>
182 <cleanup>try</cleanup>
183 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
184 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
186 <tag>${dockertag1}</tag>
187 <tag>${dockertag2}</tag>
195 <id>generate-images</id>
196 <phase>package</phase>
204 <phase>deploy</phase>
213 <!-- This is to add any extra scripts, sql dump files, properties files
214 APPC may need even after inheriting from the sdnc base image -->
216 <artifactId>maven-resources-plugin</artifactId>
217 <version>2.6</version>
220 <id>copy-dockerfile</id>
222 <goal>copy-resources</goal>
223 </goals><!-- here the phase you need -->
224 <phase>validate</phase>
226 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
229 <directory>src/main/docker</directory>
231 <include>Dockerfile</include>
233 <filtering>true</filtering>
239 <id>copy-scripts</id>
241 <goal>copy-resources</goal>
243 <phase>validate</phase>
245 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
248 <directory>src/main/scripts</directory>
250 <include>*.sh</include>
252 <filtering>false</filtering>
260 <artifactId>exec-maven-plugin</artifactId>
261 <groupId>org.codehaus.mojo</groupId>
262 <version>1.5.0</version>
265 <id>Get features</id>
266 <phase>generate-sources</phase>
271 <executable>bash</executable>
272 <environmentVariables>
273 <APPC_VERSION>${appc.version}</APPC_VERSION>
274 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
275 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
276 </environmentVariables>
278 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
279 <argument>${basedir}/target/docker-stage</argument>
280 <argument>${basedir}/target/docker-stage</argument>