summaryrefslogtreecommitdiffstats
path: root/pom.xml
diff options
context:
space:
mode:
authorPrudence Au <prudence.au@amdocs.com>2018-08-09 20:28:12 -0400
committerPrudence Au <prudence.au@amdocs.com>2018-08-09 21:37:59 -0400
commitad8bfe6246315f62bc17e6f4d9cf0d65cf3ef9bc (patch)
tree69d62ea90ce37f0df4909754fa3ce3bb479a73c4 /pom.xml
parent530c27683d89214372a33b844e4606517b5ce8d4 (diff)
Create Docker Image
Change-Id: I94f5b534eb75f2dfaeecb52bd36931926f0923cf Issue-ID: LOG-519 Signed-off-by: Prudence Au <prudence.au@amdocs.com>
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml76
1 files changed, 74 insertions, 2 deletions
diff --git a/pom.xml b/pom.xml
index 979afec..54e8e17 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,6 +19,11 @@
<java.version>1.8</java.version>
<dmaap.client.version>1.1.5</dmaap.client.version>
<aai.rest.client.version>1.2.1</aai.rest.client.version>
+ <!--docker-->
+ <docker.tag>${project.version}-${timestamp}</docker.tag>
+ <docker.latest.tag>${project.version}-latest</docker.latest.tag>
+ <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
+ <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
</properties>
<dependencyManagement>
@@ -149,7 +154,7 @@
</execution>
</executions>
</plugin>
- <plugin>
+ <!--<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.11</version>
@@ -170,7 +175,7 @@
</imageTags>
<forceTags>true</forceTags>
</configuration>
- </plugin>
+ </plugin>-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
@@ -195,4 +200,71 @@
</resource>
</resources>
</build>
+
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.19.1</version>
+ <configuration>
+ <verbose>true</verbose>
+ <apiVersion>1.23</apiVersion>
+ <pullRegistry>${docker.pull.registry}</pullRegistry>
+ <pushRegistry>${docker.push.registry}</pushRegistry>
+ <dockerHost>${docker.pull.registry}</dockerHost>
+ <images>
+ <image>
+ <name>onap/${project.artifactId}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <cleanup>true</cleanup>
+ <tags>
+ <tag>${docker.snapshot.tag}</tag>
+ <tag>${docker.latest.tag}</tag>
+ </tags>
+ <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>clean-images</id>
+ <phase>pre-clean</phase>
+ <goals>
+ <goal>remove</goal>
+ </goals>
+ <configuration>
+ <removeAll>true</removeAll>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>generate-images</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>push-images</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ <configuration>
+ <image>onap/vvp/cms</image>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project> \ No newline at end of file