summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmis <michael.morris@ericsson.com>2018-03-06 17:48:31 +0000
committermmis <michael.morris@ericsson.com>2018-03-07 10:34:12 +0000
commit19b1048eb866acc29a4a2a32cb19f860a136b168 (patch)
tree88d85caa43b632284cf914422410d7ad5205d46b
parent8bcc129d8f1b6f8241edd70dc207b013641b4ad9 (diff)
Copy files for docker image in packages/docker/pom
Copying the files in the pom removes the need to do the copying in various locations the docker build is executed from and allows the docker image be built without building the entire repo (as the install.zip can be pulled from nexus) Issue-ID: POLICY-652 Change-Id: I77d0f76bd1c11261b3d4d8bdd60572e545a98aa1 Signed-off-by: mmis <michael.morris@ericsson.com>
-rw-r--r--docker_build.sh3
-rw-r--r--docker_merge.sh3
-rw-r--r--docker_verify.sh3
-rw-r--r--packages/docker/pom.xml72
4 files changed, 44 insertions, 37 deletions
diff --git a/docker_build.sh b/docker_build.sh
index 07f177ad..2c5be1d2 100644
--- a/docker_build.sh
+++ b/docker_build.sh
@@ -42,9 +42,6 @@ fi
echo $MVN_MAJMIN_VERSION
echo "Building $IMAGE"
-mkdir -p packages/docker/target/$IMAGE
-cp packages/docker/src/main/docker/* packages/docker/target/$IMAGE
-cp packages/install/target/install-drools-$MVN_VERSION.zip packages/docker/target/$IMAGE/install-drools.zip
#
# This is the local latest tagged image. The Dockerfile's need this to build images
diff --git a/docker_merge.sh b/docker_merge.sh
index 33984553..ffcb49ab 100644
--- a/docker_merge.sh
+++ b/docker_merge.sh
@@ -42,9 +42,6 @@ fi
echo $MVN_MAJMIN_VERSION
echo "Building $IMAGE"
-mkdir -p packages/docker/target/$IMAGE
-cp packages/docker/src/main/docker/* packages/docker/target/$IMAGE
-cp packages/install/target/install-drools-$MVN_VERSION.zip packages/docker/target/$IMAGE/install-drools.zip
#
# This is the local latest tagged image. The Dockerfile's need this to build images
diff --git a/docker_verify.sh b/docker_verify.sh
index 17cf553e..5e848711 100644
--- a/docker_verify.sh
+++ b/docker_verify.sh
@@ -45,9 +45,6 @@ fi
echo $MVN_MAJMIN_VERSION
echo "Building $IMAGE"
-mkdir -p packages/docker/target/$IMAGE
-cp packages/docker/src/main/docker/* packages/docker/target/$IMAGE
-cp packages/install/target/install-drools-$MVN_VERSION.zip packages/docker/target/$IMAGE/install-drools.zip
#
# This is the local latest tagged image. The Dockerfile's need this to build images
diff --git a/packages/docker/pom.xml b/packages/docker/pom.xml
index 970ffc8a..4ba20358 100644
--- a/packages/docker/pom.xml
+++ b/packages/docker/pom.xml
@@ -29,9 +29,7 @@
<version>1.2.0-SNAPSHOT</version>
</parent>
- <groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>docker</artifactId>
- <version>1.2.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Policy Drools PDP - Docker build</name>
<description>ONAP Policy Drools PDP Docker Build</description>
@@ -40,38 +38,33 @@
<nexusproxy>https://nexus.onap.org</nexusproxy>
</properties>
- <repositories>
- <!-- LF repositories -->
- <repository>
- <id>ecomp-releases</id>
- <name>Release Repository</name>
- <url>${nexusproxy}/content/repositories/releases/</url>
- </repository>
- <repository>
- <id>ecomp-staging</id>
- <name>Staging Repository</name>
- <url>${nexusproxy}/content/repositories/staging/</url>
- </repository>
- <repository>
- <id>ecomp-snapshots</id>
- <name>Snapshots Repository</name>
- <url>${nexusproxy}/content/repositories/snapshots/</url>
- </repository>
- <repository>
- <id>ecomp-public</id>
- <name>Public Repository</name>
- <url>${nexusproxy}/content/repositories/public/</url>
- </repository>
- <!-- LF repositories END-->
- </repositories>
-
-
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
+ <execution>
+ <id>copy-drools-zip</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/policy-drools</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.onap.policy.drools-pdp</groupId>
+ <artifactId>install-drools</artifactId>
+ <version>${project.version}</version>
+ <type>zip</type>
+ <destFileName>install-drools.zip</destFileName>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
<execution>
<id>copy-apps-zip</id>
<phase>prepare-package</phase>
@@ -95,6 +88,29 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.0.2</version>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/policy-drools</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/docker</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>