blob: b943d08a43fbadaa1787d46560a1990283860ce7 [file] [log] [blame]
Instrumental4ad47632018-07-13 15:49:26 -05001#!/bin/bash
Instrumental12f7f462018-04-23 15:43:47 -05002# Pull in Variables from d.props
3. ./d.props
Instrumental94053612018-10-08 11:27:18 -05004DOCKER=${DOCKER:=docker}
Instrumentaldf9e8272018-04-05 20:52:32 -05005
6if [ "$1" == "" ]; then
Instrumentale44d2f72018-08-16 17:22:45 -05007 AAF_COMPONENTS="$(cat components) config core agent"
Instrumentaldf9e8272018-04-05 20:52:32 -05008else
Instrumentale44d2f72018-08-16 17:22:45 -05009 AAF_COMPONENTS="$@"
Instrumentaldf9e8272018-04-05 20:52:32 -050010fi
11
Instrumental94053612018-10-08 11:27:18 -050012echo "Y" | $DOCKER container prune
Instrumentaldf9e8272018-04-05 20:52:32 -050013for AAF_COMPONENT in ${AAF_COMPONENTS}; do
Instrumental94053612018-10-08 11:27:18 -050014 $DOCKER image rm $ORG/$PROJECT/aaf_$AAF_COMPONENT:${VERSION}
Instrumental235dd9a2018-10-03 21:36:44 -050015 if [ ! "$PREFIX" = "" ]; then
Instrumental94053612018-10-08 11:27:18 -050016 $DOCKER image rm $DOCKER_REPOSITORY/$ORG/$PROJECT/aaf_$AAF_COMPONENT:${VERSION}
17 $DOCKER image rm $DOCKER_REPOSITORY/$ORG/$PROJECT/aaf_$AAF_COMPONENT:latest
Instrumentale44d2f72018-08-16 17:22:45 -050018 fi
Instrumentaldf9e8272018-04-05 20:52:32 -050019done
Instrumental94053612018-10-08 11:27:18 -050020echo "Y" | $DOCKER image prune