1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
6 <groupId>org.onap.ccsdk.parent</groupId>
7 <artifactId>odlparent-lite</artifactId>
8 <version>1.1.1-SNAPSHOT</version>
10 <modelVersion>4.0.0</modelVersion>
11 <packaging>pom</packaging>
12 <groupId>org.onap.ccsdk.distribution</groupId>
13 <artifactId>ansible-server</artifactId>
14 <version>0.3.1-SNAPSHOT</version>
16 <name>ccsdk :: distribution :: ${project.artifactId}</name>
17 <description>Creates ansible-server Docker container</description>
20 <image.name>onap/ccsdk-ansible-server-image</image.name>
21 <ccsdk.project.version>${project.version}</ccsdk.project.version>
22 <ccsdk.distribution.version>${project.version}</ccsdk.distribution.version>
23 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
24 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
31 <groupId>org.codehaus.groovy.maven</groupId>
32 <artifactId>gmaven-plugin</artifactId>
35 <phase>validate</phase>
41 println project.properties['ccsdk.project.version'];
43 if ( project.properties['ccsdk.project.version'] != null ) {
44 versionArray = project.properties['ccsdk.project.version'].split('\\.');
47 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
49 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
51 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
54 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
62 <artifactId>maven-resources-plugin</artifactId>
63 <version>2.6</version>
66 <id>copy-dockerfile</id>
68 <goal>copy-resources</goal>
69 </goals><!-- here the phase you need -->
70 <phase>validate</phase>
72 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
75 <directory>src/main/docker</directory>
77 <include>Dockerfile</include>
79 <filtering>true</filtering>
88 <goal>copy-resources</goal>
89 </goals><!-- here the phase you need -->
90 <phase>validate</phase>
92 <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk</outputDirectory>
95 <directory>src/main/scripts</directory>
99 <filtering>false</filtering>
108 <goal>copy-resources</goal>
109 </goals><!-- here the phase you need -->
110 <phase>validate</phase>
112 <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/Playbooks</outputDirectory>
115 <directory>src/main/yml</directory>
119 <filtering>false</filtering>
128 <artifactId>exec-maven-plugin</artifactId>
129 <groupId>org.codehaus.mojo</groupId>
130 <version>1.5.0</version>
133 <id>change python permissions</id>
134 <phase>process-sources</phase>
139 <executable>/usr/bin/find</executable>
141 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
142 <argument>-name</argument>
143 <argument>*.py</argument>
144 <argument>-exec</argument>
145 <argument>chmod</argument>
146 <argument>+x</argument>
147 <argument>{}</argument>
148 <argument>;</argument>
153 <id>change shell permissions</id>
154 <phase>process-sources</phase>
159 <executable>/usr/bin/find</executable>
161 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
162 <argument>-name</argument>
163 <argument>*.sh</argument>
164 <argument>-exec</argument>
165 <argument>chmod</argument>
166 <argument>+x</argument>
167 <argument>{}</argument>
168 <argument>;</argument>
183 <groupId>io.fabric8</groupId>
184 <artifactId>docker-maven-plugin</artifactId>
185 <version>0.16.5</version>
186 <inherited>false</inherited>
190 <name>${image.name}</name>
192 <cleanup>try</cleanup>
193 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
194 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
196 <tag>${project.version}</tag>
197 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
198 <tag>${project.docker.latesttag.version}</tag>
206 <id>generate-images</id>
207 <phase>package</phase>
215 <phase>deploy</phase>