Skip to content
Snippets Groups Projects
Verified Commit db9197ad authored by Martin Weise's avatar Martin Weise
Browse files
parent 2162ca5d
No related branches found
No related tags found
1 merge request!400Need assets path
...@@ -13,7 +13,8 @@ variables: ...@@ -13,7 +13,8 @@ variables:
DOC_VERSION: "1.8" DOC_VERSION: "1.8"
APP_VERSION: "1.8.0" APP_VERSION: "1.8.0"
CHART_VERSION: "1.8.0" CHART_VERSION: "1.8.0"
SUPPORTED_VERSIONS: "[\"1.7.0\",\"1.7.1\",\"1.7.2\",\"1.8.0\"]" 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"
CACHE_FALLBACK_KEY: "${CI_DEFAULT_BRANCH}" CACHE_FALLBACK_KEY: "${CI_DEFAULT_BRANCH}"
# This will supress any download for dependencies and plugins or upload messages which would clutter the console log. # This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work. # `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
......
#!/bin/bash
echo "Starting registry check ..."
VERSIONS=(${SUPPORTED_VERSIONS//,/ })
SERVICES=(${MAINTAINED_SERVICES//,/ })
for SERVICE in "${SERVICES[@]}"; do
TAGS=$(regctl tag ls "${CI_REGISTRY2_URL}/${SERVICE}")
for VERSION in "${VERSIONS[@]}"; do
if [[ "$VERSION" == "$APP_VERSION" ]]; then
continue
fi
if [[ ! "${TAGS[*]}" =~ $VERSION ]]; then
>&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
#!/bin/bash #!/bin/bash
declare -A services
services[0]=analyse-service
services[1]=auth-service-init
services[2]=dashboard-service
services[3]=data-service
services[4]=metadata-service
services[5]=search-db
services[6]=search-service
services[7]=search-service-init
services[8]=storage-service-init
services[9]=ui
echo "Starting registry housekeeping ..." echo "Starting registry housekeeping ..."
for key in "${!services[@]}"; do SUPPORTED_VERSIONS="1.7.3, 1.8.0"
echo "Checking ${CI_REGISTRY2_URL}/${services[$key]} tags ..." 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"
TAGS=$(regctl tag ls ${CI_REGISTRY2_URL}/${services[$key]}) VERSIONS=(${SUPPORTED_VERSIONS//,/ })
for tag in $TAGS; do SERVICES=(${MAINTAINED_SERVICES//,/ })
res=$(echo "${SUPPORTED_VERSIONS}" | grep "$tag")
if [[ -z $res ]]; then for SERVICE in "${SERVICES[@]}"; do
regctl tag rm ${CI_REGISTRY2_URL}/${services[$key]}:$tag TAGS=$(regctl tag ls "registry.datalab.tuwien.ac.at/dbrepo/${SERVICE}")
echo "Deleted unsupported tag ${CI_REGISTRY2_URL}/${services[$key]}:$tag" TAGS=(${TAGS//\n/ })
for TAG in "${TAGS[@]}"; do
if [[ ! "${VERSIONS[*]}" =~ $TAG ]]; then
echo "===> ${TAG}"
fi fi
done done
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment