X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fdocker%2Fdclean.sh;h=d83a13298b6675555d384f83313aa5846543c6c2;hb=e44d2f770f28c3290863e509cb2406dcb67bd686;hp=b14f0bcc39a50e66b010713a19dfe3c506e2fb8f;hpb=df9e827fa3ec1c7e32b5f5eb7a63a4c11f9da4a7;p=aaf%2Fauthz.git diff --git a/auth/docker/dclean.sh b/auth/docker/dclean.sh index b14f0bcc..d83a1329 100644 --- a/auth/docker/dclean.sh +++ b/auth/docker/dclean.sh @@ -1,14 +1,23 @@ -#!/bin/bash dclean.sh -. 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 +docker image rm $ORG/$PROJECT/aaf_agent:${VERSION} +docker image rm $ORG/$PROJECT/aaf_config:${VERSION} +docker image rm $ORG/$PROJECT/aaf_core:${VERSION} + 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