aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2022-09-02 09:35:48 +0100
committerdanielhanrahan <daniel.hanrahan@est.tech>2022-09-02 09:36:54 +0100
commit2e170663ac66bd169ffa874a22c1256ba1607a86 (patch)
tree5fa9a0bd677879bf5fe0a26262fe3221e04d8ff6
parente4cfe3fc84f138fbb2c08ed1695586989734a0b4 (diff)
Allow setting external dockerfile for simulator
If building with an external dockerfile, e.g. using mvn clean install -Pdocker -DdockerFile=/path/to/dockerfile docker will look for project files in the same directory as the new dockerfile. A new property is added for setting the context path, to allow using existing project files in src/main/docker. Issue-ID: POLICY-4334 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I25a192d01583f1085055db08477e9be884512091
-rw-r--r--models-sim/packages/models-simulator-docker/pom.xml4
1 files changed, 3 insertions, 1 deletions
diff --git a/models-sim/packages/models-simulator-docker/pom.xml b/models-sim/packages/models-simulator-docker/pom.xml
index 15daf003f..e98517b13 100644
--- a/models-sim/packages/models-simulator-docker/pom.xml
+++ b/models-sim/packages/models-simulator-docker/pom.xml
@@ -44,6 +44,7 @@
<docker.skip.push>false</docker.skip.push>
<docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
<docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
+ <docker.contextDir>${project.basedir}/src/main/docker</docker.contextDir>
<maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
<!-- There is no code in this sub-module, only holds interfaces. So skip sonar. -->
<sonar.skip>true</sonar.skip>
@@ -109,6 +110,7 @@
<build>
<cleanup>try</cleanup>
<dockerFile>${dockerFile}</dockerFile>
+ <contextDir>${docker.contextDir}</contextDir>
<tags>
<tag>${project.version}</tag>
<tag>${project.version}-${maven.build.timestamp}</tag>
@@ -180,7 +182,7 @@
<dependency>
<groupId>org.onap.policy.models.sim</groupId>
<artifactId>models-simulator-tarball</artifactId>
- <version>${project.version}</version>
+ <version>${project.version}</version>
<classifier>tarball</classifier>
<type>tar.gz</type>
</dependency>