summaryrefslogtreecommitdiffstats
path: root/vid-ext-services-simulator
diff options
context:
space:
mode:
authorOfir Sonsino <ofir.sonsino@intl.att.com>2018-12-09 10:10:02 +0000
committerGerrit Code Review <gerrit@onap.org>2018-12-09 10:10:02 +0000
commit2b8ff80b2a7af16ee75976af29a9b1c6d475c994 (patch)
treeab37d37dfd5cd0671909dbc604ee93e26ace73b1 /vid-ext-services-simulator
parent77a799f23c507f1c2d22b7a5ef6b8e3e92faf0d8 (diff)
parent178ff256e63859a88f535cee3ae33bd6c35497f2 (diff)
Merge "Add simulator to docker-compose.yml"
Diffstat (limited to 'vid-ext-services-simulator')
-rw-r--r--vid-ext-services-simulator/Dockerfile5
-rw-r--r--vid-ext-services-simulator/pom.xml57
2 files changed, 62 insertions, 0 deletions
diff --git a/vid-ext-services-simulator/Dockerfile b/vid-ext-services-simulator/Dockerfile
new file mode 100644
index 000000000..6cf2d9d0b
--- /dev/null
+++ b/vid-ext-services-simulator/Dockerfile
@@ -0,0 +1,5 @@
+FROM tomcat:jre8-alpine
+
+RUN apk add --no-cache vim net-tools bash
+
+ADD target/vidSimulator.war ./webapps \ No newline at end of file
diff --git a/vid-ext-services-simulator/pom.xml b/vid-ext-services-simulator/pom.xml
index e8e827bb5..ed6a13c67 100644
--- a/vid-ext-services-simulator/pom.xml
+++ b/vid-ext-services-simulator/pom.xml
@@ -103,6 +103,20 @@
<coberturaBuildPhase>package</coberturaBuildPhase>
</properties>
</profile>
+
+ <profile>
+ <id>docker-proxy</id>
+ <!-- activate profile if environment variable `http_proxy` is set -->
+ <activation>
+ <property>
+ <name>env.http_proxy</name>
+ </property>
+ </activation>
+ <properties>
+ <docker.buildArg.http_proxy>${env.http_proxy}</docker.buildArg.http_proxy>
+ </properties>
+ </profile>
+
</profiles>
<dependencies>
@@ -146,6 +160,49 @@
<target>1.8</target>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.27.2</version>
+
+ <configuration>
+ <images>
+ <image>
+ <name>onap/vid-simulator</name>
+ <build>
+ <cleanup>remove</cleanup>
+ <dockerFileDir>${project.basedir}</dockerFileDir>
+ <tags>
+ <tag>${project.version}</tag>
+ <tag>latest</tag>
+ </tags>
+ </build>
+ </image>
+ </images>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>generate-image</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>push-image</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+
+ </plugin>
+
</plugins>
</build>