1 <?xml version="1.0" encoding="UTF-8"?>
\r
3 ~ Copyright © 2017-2018 AT&T Intellectual Property.
\r
5 ~ Licensed under the Apache License, Version 2.0 (the "License");
\r
6 ~ you may not use this file except in compliance with the License.
\r
7 ~ You may obtain a copy of the License at
\r
9 ~ http://www.apache.org/licenses/LICENSE-2.0
\r
11 ~ Unless required by applicable law or agreed to in writing, software
\r
12 ~ distributed under the License is distributed on an "AS IS" BASIS,
\r
13 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
14 ~ See the License for the specific language governing permissions and
\r
15 ~ limitations under the License.
\r
19 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
\r
20 xmlns="http://maven.apache.org/POM/4.0.0"
\r
21 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
\r
22 <modelVersion>4.0.0</modelVersion>
\r
24 <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
\r
25 <artifactId>parent</artifactId>
\r
26 <version>0.3.0-SNAPSHOT</version>
\r
27 <relativePath>../parent</relativePath>
\r
29 <artifactId>distribution</artifactId>
\r
30 <packaging>pom</packaging>
\r
31 <name>Controller Blueprints Distribution</name>
\r
33 <assembly.id>maven</assembly.id>
\r
34 <name.space>org.onap.ccsdk.apps</name.space> <!-- <name.space>${namespace}</name.space> -->
\r
35 <serviceArtifactName>controllerblueprints</serviceArtifactName>
\r
36 <image.name>onap/ccsdk-controllerblueprints</image.name>
\r
37 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
\r
38 <docker.push.phase>deploy</docker.push.phase>
\r
39 <docker.verbose>true</docker.verbose>
\r
44 <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
\r
45 <artifactId>application</artifactId>
\r
51 <artifactId>maven-resources-plugin</artifactId>
\r
52 <version>2.6</version>
\r
55 <id>copy-dockerfile</id>
\r
57 <goal>copy-resources</goal>
\r
58 </goals><!-- here the phase you need -->
\r
59 <phase>validate</phase>
\r
61 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
\r
64 <directory>src/main/docker</directory>
\r
66 <include>*</include>
\r
68 <filtering>true</filtering>
\r
76 <groupId>org.apache.maven.plugins</groupId>
\r
77 <artifactId>maven-antrun-plugin</artifactId>
\r
81 <phase>package</phase>
\r
84 <fixcrlf srcdir="${basedir}" eol="unix"
\r
85 includes="**/*.sh, **/*.source"/>
\r
95 <!--build the final artifact for docker deployment -->
\r
96 <artifactId>maven-assembly-plugin</artifactId>
\r
97 <version>3.0.0</version>
\r
99 <!-- <skipAssembly>${skip.assembly}</skipAssembly>-->
\r
100 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
\r
102 <descriptor>src/main/docker/distribution.xml</descriptor>
\r
104 <tarLongFileMode>posix</tarLongFileMode>
\r
108 <id>${assembly.id}</id>
\r
109 <phase>package</phase>
\r
111 <goal>single</goal>
\r
117 <groupId>org.codehaus.groovy.maven</groupId>
\r
118 <artifactId>gmaven-plugin</artifactId>
\r
119 <version>1.0</version>
\r
122 <phase>validate</phase>
\r
124 <goal>execute</goal>
\r
128 println project.properties['ccsdk.project.version'];
\r
130 if (project.properties['ccsdk.project.version'] != null ) {
\r
131 versionArray = project.properties['ccsdk.project.version'].split('\\.');
\r
134 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
\r
136 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
\r
138 project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest";
\r
141 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
\r
157 <groupId>io.fabric8</groupId>
\r
158 <artifactId>docker-maven-plugin</artifactId>
\r
159 <version>0.26.1</version>
\r
160 <inherited>false</inherited>
\r
164 <name>${image.name}</name>
\r
166 <cleanup>try</cleanup>
\r
167 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
\r
169 <tag>${project.version}</tag>
\r
170 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
\r
171 <tag>${project.docker.latesttag.version}</tag>
\r
176 <verbose>true</verbose>
\r
180 <id>push-images</id>
\r
181 <phase>${docker.build.phase}</phase>
\r