Allow setting external dockerfile for db-migrator
Added maven properties to allow overriding dockerfile during build e.g.
mvn clean install -Pdocker -Ddocker.dbm.dockerFile=/path/to/dockerfile
Issue-ID: POLICY-4334
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Idb282cd121f5bf4ec91764596a88fb28e3557256
diff --git a/policy-db-migrator/pom.xml b/policy-db-migrator/pom.xml
index c135ae2..b9c9ab4 100644
--- a/policy-db-migrator/pom.xml
+++ b/policy-db-migrator/pom.xml
@@ -42,6 +42,8 @@
<docker.skip.push>false</docker.skip.push>
<maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
<docker.dbm.imagename>onap/policy-db-migrator</docker.dbm.imagename>
+ <docker.dbm.dockerFile>Dockerfile</docker.dbm.dockerFile>
+ <docker.dbm.contextDir>${project.basedir}/src/main/docker</docker.dbm.contextDir>
</properties>
<build>
@@ -81,7 +83,8 @@
<name>${docker.dbm.imagename}</name>
<build>
<cleanup>try</cleanup>
- <dockerFile>Dockerfile</dockerFile>
+ <dockerFile>${docker.dbm.dockerFile}</dockerFile>
+ <contextDir>${docker.dbm.contextDir}</contextDir>
<tags>
<tag>${project.version}</tag>
<tag>${project.version}-${maven.build.timestamp}</tag>