aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrzegorz Wielgosinski <g.wielgosins@samsung.com>2021-04-16 13:03:02 +0200
committerGrzegorz Wielgosinski <g.wielgosins@samsung.com>2021-04-16 15:31:58 +0200
commit0df2b8a52ba43dc9ff0ec3726baa70e07fd55718 (patch)
tree74691978a52d175e569de6cf4a8421febe78f021
parentfa24e1901566a2fa23a2f4a6bad419eb3bfd212a (diff)
Fix issue with missing Docker file for building docker-image
Issue-ID: INT-1896 Signed-off-by: Grzegorz Wielgosinski <g.wielgosins@samsung.com> Change-Id: Ib37d73ec965a5f514973482d2434095daf86cc23
-rw-r--r--.gitignore3
-rw-r--r--pom.xml28
2 files changed, 28 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 21f73a6..0b7223b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -105,3 +105,6 @@ local.properties
# Typically, this file would be tracked if it contains build/dependency configurations:
#.project
a1-pe-simulator.iml
+
+# Building docker-image files
+**/docker/resource/* \ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 1e9db85..d9889ed 100644
--- a/pom.xml
+++ b/pom.xml
@@ -96,7 +96,7 @@
<docker.registry>nexus3.onap.org:10003</docker.registry>
<docker-maven-plugin.version>0.31.0</docker-maven-plugin.version>
<docker-image.namespace>onap</docker-image.namespace>
- <docker-image.name.prefix>org.onap.a1pesimulator</docker-image.name.prefix>
+ <docker-image.name.prefix>integration/simulators</docker-image.name.prefix>
</properties>
<build>
@@ -133,6 +133,27 @@
<artifactId>maven-resources-plugin</artifactId>
</plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.8</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <configuration>
+ <target>
+ <copy file="target/${project.artifactId}-${project.version}.jar" tofile="./docker/${project.artifactId}-${project.version}.jar"/>
+ <copy todir="./docker/resource">
+ <fileset dir="src/main/resources"/>
+ </copy>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>com.github.kongchen</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>3.1.7</version>
@@ -177,7 +198,7 @@
<executions>
<execution>
<id>docker-build-image</id>
- <phase>package</phase>
+ <phase>install</phase>
<goals>
<goal>build</goal>
<goal>push</goal>
@@ -190,9 +211,10 @@
<imagePullPolicy>IfNotPresent</imagePullPolicy>
<images>
<image>
- <name>${docker-image.namespace}/${docker-image.name.prefix}.${project.artifactId}</name>
+ <name>${docker-image.namespace}/${docker-image.name.prefix}/${project.artifactId}</name>
<registry>${docker.registry}</registry>
<build>
+ <dockerFileDir>${project.basedir}/docker</dockerFileDir>
<tags>
<tag>${project.version}-${maven.build.timestamp}Z</tag>
</tags>