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.sdnc.oam</groupId>
7 <artifactId>installation</artifactId>
8 <version>1.2.0-SNAPSHOT</version>
11 <modelVersion>4.0.0</modelVersion>
12 <packaging>pom</packaging>
13 <groupId>org.onap.sdnc.oam</groupId>
14 <artifactId>installation-dgbuilder</artifactId>
15 <version>1.2.0-SNAPSHOT</version>
17 <name>Installation - dgbuilder</name>
18 <description>Creates docker container for dgbuilder</description>
21 <image.name>onap/dgbuilder-sdnc-image</image.name>
22 <sdnc.project.version>${project.version}</sdnc.project.version>
31 <groupId>org.codehaus.groovy.maven</groupId>
32 <artifactId>gmaven-plugin</artifactId>
35 <phase>validate</phase>
41 println project.properties['sdnc.project.version'];
43 if ( project.properties['sdnc.project.version'] != null ) {
45 project.properties['sdnc.project.version'].split('\\.');
48 if (project.properties['sdnc.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:' +
55 project.properties['project.docker.latesttag.version'];
62 <groupId>io.fabric8</groupId>
63 <artifactId>docker-maven-plugin</artifactId>
64 <version>0.16.5</version>
65 <inherited>false</inherited>
70 <name>${image.name}</name>
72 <cleanup>try</cleanup>
73 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
74 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
76 <tag>${project.version}</tag>
77 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
78 <tag>${project.docker.latesttag.version}</tag>
86 <id>generate-images</id>
87 <phase>package</phase>
104 <artifactId>maven-resources-plugin</artifactId>
105 <version>2.6</version>
108 <id>copy-dockerfile</id>
110 <goal>copy-resources</goal>
111 </goals><!-- here the phase you need -->
112 <phase>validate</phase>
114 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
117 <directory>src/main/docker</directory>
119 <include>Dockerfile</include>
121 <filtering>true</filtering>
130 <artifactId>exec-maven-plugin</artifactId>
131 <groupId>org.codehaus.mojo</groupId>
132 <version>1.5.0</version>
135 <id>Make-stage-dir</id>
136 <phase>generate-sources</phase>
141 <executable>/bin/mkdir</executable>
143 <argument>-p</argument>
144 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
149 <id>Unzip dgbuilder</id>
150 <phase>generate-sources</phase>
155 <executable>/usr/bin/unzip</executable>
157 <argument>-d</argument>
158 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
159 <argument>../../dgbuilder/target/*.zip</argument>
164 <id>Copy dgbuilder</id>
165 <phase>generate-sources</phase>
170 <executable>/bin/cp</executable>
172 <argument>-r</argument>
173 <argument>../../dgbuilder</argument>
174 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
180 <id>dgbuilder createReleaseDir</id>
181 <phase>generate-sources</phase>
186 <executable>/bin/bash</executable>
188 <argument>${basedir}/target/docker-stage/opt/onap/sdnc/dgbuilder/createReleaseDir.sh</argument>
189 <argument>1702</argument>
190 <argument>dguser</argument>
191 <argument>change_email_id@dgbuilder.com</argument>
197 <id>change shell permissions</id>
198 <phase>process-sources</phase>
203 <executable>/usr/bin/find</executable>
205 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
206 <argument>-name</argument>
207 <argument>*.sh</argument>
208 <argument>-exec</argument>
209 <argument>chmod</argument>
210 <argument>+x</argument>
211 <argument>{}</argument>
212 <argument>;</argument>
224 <name>openECOMP</name>