Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Commit

Permalink
EOEPCA-81 -all parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
josejulioramos committed Apr 24, 2020
1 parent ce9f678 commit fdc7620
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions travis/delete-dockerhub-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ if [ -z "$DOCKER_PASSWORD" ]; then
export DOCKER_PASSWORD=${PASSWORD}
fi

ALL=false
while [ "$1" != "" ]; do
case $1 in
-a | --all ) ALL=true
;;
-h | --help ) #usage
exit
;;
* ) #usage
exit 1
esac
shift
done

# -------

set -e
Expand All @@ -35,10 +49,12 @@ REPO_LOCAL_PATH=`git rev-parse --show-toplevel`
REPO_NAME=`basename $REPO_LOCAL_PATH`

# delete images and/or tags
echo "Deleting images and tags for organization: ${ORG} in repository: ${REPO_NAME}"
echo "Deleting images and tags for organization: ${ORG}"

echo $REPO_LIST
for i in ${REPO_LIST}
do
if [ "$i" = "$REPO_NAME" ]; then
if [ "$i" = "$REPO_NAME" ] || [ "$ALL" = "true" ]; then
echo "\nEntering repository $i"

# Delete by tags starting with "travis_"
Expand Down

0 comments on commit fdc7620

Please sign in to comment.