From 85b4e413a6b5c82fcd7ddff01c6f7d2edccf79b1 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Mon, 5 Aug 2019 19:33:17 -0500 Subject: [PATCH] Docker Deal with SNAPSHOT Issue-ID: AAF-917 Change-Id: Ib97058d19164c05e43c96c1df68bbc1cddea1644 Signed-off-by: Instrumental --- auth/docker/dbuild.sh | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/auth/docker/dbuild.sh b/auth/docker/dbuild.sh index 703abc5a..a2a17e63 100755 --- a/auth/docker/dbuild.sh +++ b/auth/docker/dbuild.sh @@ -69,14 +69,26 @@ $DOCKER tag ${ORG}/${PROJECT}/aaf_base:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${ $DOCKER tag ${ORG}/${PROJECT}/aaf_base:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_base:latest rm Dockerfile +# Tack the "SNAPSHOT" out of name +function SCP() { + SANS=${1/-SNAPSHOT/} + if [ -e $SANS ]; then + cp $SANS $2 + else + ln $1 $SANS + cp $SANS $2 + rm $SANS + fi +} + ######## # Second, Create the AAF Config (Security) Images cd .. # Note: only 2 jars each in Agent/Config -cp auth-cmd/target/aaf-auth-cmd-$VERSION-full.jar sample/bin -cp auth-batch/target/aaf-auth-batch-$VERSION-full.jar sample/bin -cp ../cadi/aaf/target/aaf-cadi-aaf-${VERSION}-full.jar sample/bin -cp ../cadi/servlet-sample/target/aaf-cadi-servlet-sample-${VERSION}-sample.jar sample/bin +SCP auth-cmd/target/aaf-auth-cmd-$VERSION-full.jar sample/bin +SCP auth-batch/target/aaf-auth-batch-$VERSION-full.jar sample/bin +SCP ../cadi/aaf/target/aaf-cadi-aaf-${VERSION}-full.jar sample/bin +SCP ../cadi/servlet-sample/target/aaf-cadi-servlet-sample-${VERSION}-sample.jar sample/bin cp -Rf ../conf/CA sample # AAF Config image (for AAF itself) @@ -101,7 +113,7 @@ $DOCKER tag ${ORG}/${PROJECT}/aaf_agent:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/$ $DOCKER tag ${ORG}/${PROJECT}/aaf_agent:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_agent:latest # Clean up -rm sample/Dockerfile sample/bin/aaf-*-${VERSION}*.jar +rm sample/Dockerfile sample/bin/aaf-*-*.jar rm -Rf sample/CA cd - -- 2.16.6