summaryrefslogtreecommitdiffstats
path: root/test/mocks
diff options
context:
space:
mode:
authorGeora Barsky <georab@amdocs.com>2017-09-22 14:56:12 -0400
committerGeora Barsky <georab@amdocs.com>2017-09-22 15:02:55 -0400
commitf9aac39a55e54f4824abc873ab8e1e59cce2301e (patch)
tree44649128e74e8eacf63a6aca3cf6f59308fb0d22 /test/mocks
parent46c1a40e6cb283f7d42270b877401d584d168494 (diff)
Sniro Emulator - Adding maven docker plugin
Maven plugin to build docker image has been added to pom file Change-Id: I2f6cff227427fe2dceb7baa73b78a4924bfd2622 JIRA-ID: INT-215 Signed-off-by: Geora Barsky <georab@amdocs.com>
Diffstat (limited to 'test/mocks')
-rw-r--r--test/mocks/sniroemulator/pom.xml42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/mocks/sniroemulator/pom.xml b/test/mocks/sniroemulator/pom.xml
index 7faff9356..714be51d1 100644
--- a/test/mocks/sniroemulator/pom.xml
+++ b/test/mocks/sniroemulator/pom.xml
@@ -17,6 +17,7 @@
</parent>
<properties>
+ <dockerLocation>${basedir}/target</dockerLocation>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
@@ -137,6 +138,47 @@
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.7</version>
+ <executions>
+ <execution>
+ <id>copy-docker-file</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>target</outputDirectory>
+ <overwrite>true</overwrite>
+ <resources>
+ <resource>
+ <directory>${basedir}/src/main/docker</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.spotify</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.4.11</version>
+ <configuration>
+ <imageName>openecomp/${project.artifactId}</imageName>
+ <dockerDirectory>${dockerLocation}</dockerDirectory>
+ <serverId>docker-hub</serverId>
+ <imageTags>
+ <imageTag>latest</imageTag>
+ </imageTags>
+ <forceTags>true</forceTags>
+ </configuration>
+ </plugin>
</plugins>
</build>
</project>