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.0.1-SNAPSHOT</version>
10 <modelVersion>4.0.0</modelVersion>
11 <packaging>pom</packaging>
12 <groupId>org.onap.sdnc.oam</groupId>
13 <artifactId>installation-ansible-server</artifactId>
14 <version>1.3.1-SNAPSHOT</version>
16 <name>sdnc-oam :: installation :: ${project.artifactId}</name>
17 <description>Creates ansible-server Docker container</description>
20 <image.name>onap/sdnc-ansible-server-image</image.name>
21 <sdnc.project.version>${project.version}</sdnc.project.version>
22 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
23 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
30 <groupId>org.codehaus.groovy.maven</groupId>
31 <artifactId>gmaven-plugin</artifactId>
34 <phase>validate</phase>
40 println project.properties['sdnc.project.version'];
42 if ( project.properties['sdnc.project.version'] != null ) {
43 versionArray = project.properties['sdnc.project.version'].split('\\.');
46 if (project.properties['sdnc.project.version'].endsWith("-SNAPSHOT"))
48 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
50 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
53 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
61 <artifactId>maven-resources-plugin</artifactId>
62 <version>2.6</version>
65 <id>copy-dockerfile</id>
67 <goal>copy-resources</goal>
68 </goals><!-- here the phase you need -->
69 <phase>validate</phase>
71 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
74 <directory>src/main/docker</directory>
76 <include>Dockerfile</include>
78 <filtering>true</filtering>
87 <goal>copy-resources</goal>
88 </goals><!-- here the phase you need -->
89 <phase>validate</phase>
91 <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc</outputDirectory>
94 <directory>src/main/scripts</directory>
98 <filtering>false</filtering>
107 <goal>copy-resources</goal>
108 </goals><!-- here the phase you need -->
109 <phase>validate</phase>
111 <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/Playbooks</outputDirectory>
114 <directory>src/main/yml</directory>
118 <filtering>false</filtering>
127 <artifactId>exec-maven-plugin</artifactId>
128 <groupId>org.codehaus.mojo</groupId>
129 <version>1.5.0</version>
132 <id>change python permissions</id>
133 <phase>process-sources</phase>
138 <executable>/usr/bin/find</executable>
140 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
141 <argument>-name</argument>
142 <argument>*.py</argument>
143 <argument>-exec</argument>
144 <argument>chmod</argument>
145 <argument>+x</argument>
146 <argument>{}</argument>
147 <argument>;</argument>
152 <id>change shell permissions</id>
153 <phase>process-sources</phase>
158 <executable>/usr/bin/find</executable>
160 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
161 <argument>-name</argument>
162 <argument>*.sh</argument>
163 <argument>-exec</argument>
164 <argument>chmod</argument>
165 <argument>+x</argument>
166 <argument>{}</argument>
167 <argument>;</argument>
182 <groupId>io.fabric8</groupId>
183 <artifactId>docker-maven-plugin</artifactId>
184 <version>0.16.5</version>
185 <inherited>false</inherited>
189 <name>${image.name}</name>
191 <cleanup>try</cleanup>
192 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
193 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
195 <tag>${project.version}</tag>
196 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
197 <tag>${project.docker.latesttag.version}</tag>
205 <id>generate-images</id>
206 <phase>package</phase>
214 <phase>deploy</phase>