1 <?xml version="1.0" encoding="UTF-8"?>
3 ~ Copyright © 2017-2018 AT&T Intellectual Property.
4 ~ Modifications Copyright © 2019 Bell Canada.
6 ~ Licensed under the Apache License, Version 2.0 (the "License");
7 ~ you may not use this file except in compliance with the License.
8 ~ You may obtain a copy of the License at
10 ~ http://www.apache.org/licenses/LICENSE-2.0
12 ~ Unless required by applicable law or agreed to in writing, software
13 ~ distributed under the License is distributed on an "AS IS" BASIS,
14 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 ~ See the License for the specific language governing permissions and
16 ~ limitations under the License.
18 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
19 <modelVersion>4.0.0</modelVersion>
21 <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
22 <artifactId>parent</artifactId>
23 <version>0.4.1-SNAPSHOT</version>
24 <relativePath>../parent</relativePath>
26 <artifactId>distribution</artifactId>
27 <packaging>pom</packaging>
28 <name>Controller Blueprints Distribution</name>
30 <assembly.id>maven</assembly.id>
31 <name.space>org.onap.ccsdk.apps</name.space> <!-- <name.space>${namespace}</name.space> -->
32 <serviceArtifactName>controllerblueprints</serviceArtifactName>
33 <image.name>onap/ccsdk-controllerblueprints</image.name>
34 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
35 <docker.push.phase>deploy</docker.push.phase>
36 <docker.verbose>true</docker.verbose>
41 <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
42 <artifactId>application</artifactId>
48 <artifactId>maven-resources-plugin</artifactId>
49 <version>2.6</version>
52 <id>copy-dockerfile</id>
54 <goal>copy-resources</goal>
55 </goals><!-- here the phase you need -->
56 <phase>validate</phase>
58 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
61 <directory>src/main/docker</directory>
65 <filtering>true</filtering>
73 <groupId>org.apache.maven.plugins</groupId>
74 <artifactId>maven-antrun-plugin</artifactId>
78 <phase>package</phase>
81 <fixcrlf srcdir="${basedir}" eol="unix" includes="**/*.sh, **/*.source"/>
91 <!--build the final artifact for docker deployment -->
92 <artifactId>maven-assembly-plugin</artifactId>
93 <version>3.1.0</version>
95 <!-- <skipAssembly>${skip.assembly}</skipAssembly>-->
96 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
98 <descriptor>src/main/docker/distribution.xml</descriptor>
100 <tarLongFileMode>posix</tarLongFileMode>
104 <id>${assembly.id}</id>
105 <phase>package</phase>
113 <groupId>org.codehaus.groovy.maven</groupId>
114 <artifactId>gmaven-plugin</artifactId>
115 <version>1.0</version>
118 <phase>validate</phase>
124 println project.properties['ccsdk.project.version']
126 if (project.properties['ccsdk.project.version'] != null ) {
127 versionArray = project.properties['ccsdk.project.version'].split('\\.')
130 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
132 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest"
134 project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest"
137 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version']
153 <groupId>io.fabric8</groupId>
154 <artifactId>docker-maven-plugin</artifactId>
155 <version>0.26.1</version>
156 <inherited>false</inherited>
160 <name>${image.name}</name>
162 <cleanup>try</cleanup>
163 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
165 <tag>${project.version}</tag>
166 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
167 <tag>${project.docker.latesttag.version}</tag>
172 <verbose>true</verbose>
176 <id>generate-images</id>
177 <phase>package</phase>
184 <phase>${docker.push.phase}</phase>