mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-19 12:15:28 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
+2
-2
@@ -27,7 +27,7 @@ shift
|
||||
echo "Deleting tags $* in repository ${REPO}..."
|
||||
|
||||
# delete images and/or tags
|
||||
IMAGE_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://cloud.docker.com/v2/repositories/${REPO}/tags/?page_size=1000 | jq -r '.results|.[]|.name')
|
||||
IMAGE_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/${REPO}/tags/?page_size=1000 | jq -r '.results|.[]|.name')
|
||||
for j in ${IMAGE_TAGS}
|
||||
do
|
||||
# echo "Checking tag $j"
|
||||
@@ -39,7 +39,7 @@ do
|
||||
if [[ $j =~ $k ]]; then
|
||||
found=1
|
||||
echo -n " - ${j} ... "
|
||||
curl -X DELETE -s -H "Authorization: JWT ${TOKEN}" https://cloud.docker.com/v2/repositories/${REPO}/tags/${j}/
|
||||
curl -X DELETE -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/${REPO}/tags/${j}/
|
||||
echo "DELETED ($?)"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -14,6 +14,6 @@ echo
|
||||
|
||||
# get token
|
||||
echo "Retrieving token ..."
|
||||
TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${UNAME}'", "password": "'${UPASS}'"}' https://cloud.docker.com/v2/users/login/ | jq -r .token)
|
||||
TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${UNAME}'", "password": "'${UPASS}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)
|
||||
|
||||
echo "$TOKEN" >"${TOKEN_FILE}"
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ shift
|
||||
|
||||
# -------
|
||||
|
||||
IMAGE_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://cloud.docker.com/v2/repositories/${REPO}/tags/?page_size=1000 | jq -r '.results|.[]|.name')
|
||||
IMAGE_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/${REPO}/tags/?page_size=1000 | jq -r '.results|.[]|.name')
|
||||
for j in ${IMAGE_TAGS}
|
||||
do
|
||||
if [ "$#" = "0" ]; then
|
||||
|
||||
Reference in New Issue
Block a user