aboutsummaryrefslogtreecommitdiffstats
path: root/cdt/src
diff options
context:
space:
mode:
authorPatrick Brady <pb071s@att.com>2018-07-25 12:56:09 -0700
committerPatrick Brady <pb071s@att.com>2018-07-25 12:56:13 -0700
commitb581c186ff9d7fef8194c0d69f827ca153dfcd45 (patch)
treefed9db31d20f8c83ef7ef290de8b56cae4056d5f /cdt/src
parentf2fd5cf6544e796d6a2f02c7777001b3d4cf2331 (diff)
Keep cdt artifact download in folder
Create a folder in /tmp to keep each version of cdt by itself. Clear this folder before build so that only the newest version will be unzipped and put into the docker image. Change-Id: I9c42699f6de2db04d06316358dbe2bca04346eec Signed-off-by: Patrick Brady <pb071s@att.com> Issue-ID: APPC-1109
Diffstat (limited to 'cdt/src')
-rw-r--r--cdt/src/main/scripts/installZips.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/cdt/src/main/scripts/installZips.sh b/cdt/src/main/scripts/installZips.sh
index a1b6cc4..bb27216 100644
--- a/cdt/src/main/scripts/installZips.sh
+++ b/cdt/src/main/scripts/installZips.sh
@@ -51,8 +51,17 @@ cd /tmp
echo "Downloading cdt code from nexus"
-mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.appc.cdt:config-design-tool:${APPC_VERSION}:zip -DoutputDirectory=/tmp
-unzip -d ${targetDir}/config-design-tool /tmp/config-design-tool*.zip
+
+CDT_TEMP_DIR=/tmp/appc-config-design-tool-${APPC_VERSION}
+if [ ! -d ${CDT_TEMP_DIR} ]
+then
+ mkdir -p ${CDT_TEMP_DIR}
+fi
+
+rm ${CDT_TEMP_DIR}/config-design-tool*.zip
+
+mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.appc.cdt:config-design-tool:${APPC_VERSION}:zip -DoutputDirectory=${CDT_TEMP_DIR}
+unzip -d ${targetDir}/config-design-tool ${CDT_TEMP_DIR}/config-design-tool*.zip
find ${targetDir} -name '*.sh' -exec chmod +x '{}' \;