user=
pswd=
url=
proid=
REPOS=$(curl -s -X GET --header 'Accept: application/json' "${url}/api/repositories?project_id=${proid}"|grep "name"|awk -F '"' '{print $4}')
for rp in ${REPOS}
do
TAGS=$(curl -s -X GET --header 'Accept: application/json' "${url}/api/repositories/${rp}/tags"|grep "name"|awk -F '"' '{print $4}')
for t in ${TAGS}
do
curl -u "${user}:${pswd}" -X DELETE -H "Content-Type: application/json" "${url}/api/repositories/${rp}/tags/${t}"
echo ${URL}"/"${rp}":"${t} >> /app/container/docker.tag
done
echo "删除 ===> ${URL}/${rp}/${t}"
done