Skip to content
Snippets Groups Projects
Verified Commit 516247bd authored by Martin Weise's avatar Martin Weise
Browse files
parent fed530b9
No related branches found
No related tags found
1 merge request!400Need assets path
#!/bin/bash
echo "Starting registry check ..."
SUPPORTED_VERSIONS="1.7.3, 1.8.0"
MAINTAINED_SERVICES="analyse-service, auth-service-init, dashboard-service, dashboard-service-init, data-service, metadata-service, search-db, search-service, search-service-init, storage-service-init, ui"
CI_REGISTRY2_URL="registry.datalab.tuwien.ac.at/dbrepo"
VERSIONS=(${SUPPORTED_VERSIONS//,/ })
SERVICES=(${MAINTAINED_SERVICES//,/ })
......@@ -14,7 +18,6 @@ for SERVICE in "${SERVICES[@]}"; do
>&2 echo "[ERROR] Failed to find image: ${CI_REGISTRY2_URL}/${SERVICE}:${VERSION}"
exit 1
fi
echo "[DEBUG] Found image: ${CI_REGISTRY2_URL}/${SERVICE}:${VERSION}"
done
echo "[INFO] Finished successfully."
done
echo "[INFO] Finished successfully."
#!/bin/bash
echo "Starting registry housekeeping ..."
SUPPORTED_VERSIONS="1.7.3, 1.8.0"
MAINTAINED_SERVICES="analyse-service, auth-service-init, dashboard-service, dashboard-service-init, data-service, metadata-service, search-db, search-service, search-service-init, storage-service-init, ui"
VERSIONS=(${SUPPORTED_VERSIONS//,/ })
SERVICES=(${MAINTAINED_SERVICES//,/ })
CI_REGISTRY2_URL="registry.datalab.tuwien.ac.at/dbrepo"
for SERVICE in "${SERVICES[@]}"; do
TAGS=$(regctl tag ls "${CI_REGISTRY2_URL}/${SERVICE}")
TAGS=(${TAGS//\n/ })
for TAG in "${TAGS[@]}"; do
if [[ ! "${VERSIONS[*]}" =~ $TAG ]]; then
echo "===> ${TAG}"
regctl tag rm ${CI_REGISTRY2_URL}/${SERVICE}:$TAG
echo "[INFO] Deleted unsupported tag ${CI_REGISTRY2_URL}/${SERVICE}:$TAG"
fi
done
done
#for key in "${!services[@]}"; do
# echo "Checking ${CI_REGISTRY2_URL}/${services[$key]} tags ..."
# TAGS=$(regctl tag ls ${CI_REGISTRY2_URL}/${services[$key]})
# for tag in $TAGS; do
# res=$(echo "${SUPPORTED_VERSIONS}" | grep "$tag")
# if [[ -z $res ]]; then
# regctl tag rm ${CI_REGISTRY2_URL}/${services[$key]}:$tag
# echo "Deleted unsupported tag ${CI_REGISTRY2_URL}/${services[$key]}:$tag"
# fi
# done
#done
echo "[INFO] Finished successfully."
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment