From 842fdfce58b6879217e1242596698509b06540a9 Mon Sep 17 00:00:00 2001 From: mmis Date: Tue, 6 Mar 2018 16:36:00 +0000 Subject: 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: I90498f7e0c00e63381d746f80f937b31b3f7199d Signed-off-by: mmis --- docker_build.sh | 3 --- docker_merge.sh | 3 --- docker_verify.sh | 3 --- packages/docker/pom.xml | 51 +++++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 49 insertions(+), 11 deletions(-) diff --git a/docker_build.sh b/docker_build.sh index 1548eade7..d7794bf90 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-$MVN_VERSION.zip packages/docker/target/$IMAGE/install.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 c87dacea6..c8bde37e3 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-$MVN_VERSION.zip packages/docker/target/$IMAGE/install.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 a6dd00a13..dc405138f 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-$MVN_VERSION.zip packages/docker/target/$IMAGE/install.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 02b1d871b..68b4d9266 100644 --- a/packages/docker/pom.xml +++ b/packages/docker/pom.xml @@ -29,9 +29,7 @@ 1.2.0-SNAPSHOT - org.onap.policy.engine docker - 1.2.0-SNAPSHOT pom Policy Engine - Docker build ONAP Policy Docker Build @@ -42,6 +40,55 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-pe-zip + prepare-package + + copy + + + ${project.build.directory}/policy-pe + false + true + + + org.onap.policy.engine + install + ${project.version} + zip + install.zip + + + + + + + + maven-resources-plugin + 3.0.2 + + + copy-resources + prepare-package + + copy-resources + + + ${project.build.directory}/policy-pe + + + src/main/docker + true + + + + + + org.codehaus.mojo exec-maven-plugin -- cgit 1.2.3-korg