X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fdocker%2Fdclean.sh;h=f855067424bc84485d0d258d6114a7af32143f8f;hb=ee72c3ab8a95a775e5a1db5ea1b1566e0c59f626;hp=4c2dd3bfc1741e0123bb764e389627dd2ca47fa2;hpb=dcfee329193f2324196f5a1bda18a2d30f1277a4;p=aaf%2Fauthz.git diff --git a/auth/docker/dclean.sh b/auth/docker/dclean.sh index 4c2dd3bf..f8550674 100644 --- a/auth/docker/dclean.sh +++ b/auth/docker/dclean.sh @@ -1,18 +1,19 @@ -#!/bin/bash dclean.sh -ORG=onap -PROJECT=aaf -DOCKER_REPOSITORY=nexus3.onap.org:10003 -VERSION=2.1.0-SNAPSHOT -./d.props +#!/bin/bash +# Pull in Variables from d.props +. ./d.props if [ "$1" == "" ]; then - AAF_COMPONENTS=`ls ../aaf_${VERSION}/bin | grep -v '\.'` + AAF_COMPONENTS="$(cat components) config core agent" else - AAF_COMPONENTS=$1 + AAF_COMPONENTS="$@" fi echo "Y" | docker container prune for AAF_COMPONENT in ${AAF_COMPONENTS}; do - docker image rm $DOCKER_REPOSITORY/$ORG/$PROJECT/aaf_$AAF_COMPONENT:${VERSION} + docker image rm $ORG/$PROJECT/aaf_$AAF_COMPONENT:${VERSION} + if [ ! "$PREFIX" = "" ]; then + docker image rm $DOCKER_REPOSITORY/$ORG/$PROJECT/aaf_$AAF_COMPONENT:${VERSION} + docker image rm $DOCKER_REPOSITORY/$ORG/$PROJECT/aaf_$AAF_COMPONENT:latest + fi done echo "Y" | docker image prune