Commit 7babef2b authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

removed composer image cleanup as its not needed anymore

parent a0f753bc
......@@ -32,14 +32,6 @@ nginx:
after_script:
- docker logout $CI_REGISTRY
cleanup_composer_image:
stage: build_docker_images
image: curlimages/curl
needs:
- composer
script:
- 'curl -X DELETE --fail -H "JOB-TOKEN: $CI_JOB_TOKEN" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/registry/repositories/418/tags/$DOCKER_COMPOSER_IMAGE_TAG"'
.cleanup_revision_images:
stage: build_docker_images
image: $DEPLOY_KUBERNETES_IMAGE
......
#!/bin/bash
set -e
FPM_REPOSITORY_ID=418
NGINX_REPOSITORY_ID=416
......@@ -19,7 +21,6 @@ do
existing_tags_fpm[$tag]=1
fi
done
headers=$(cat /tmp/headers.txt)
while read header
do
header=$(echo $header | sed -r 's/\s+//g')
......@@ -53,7 +54,6 @@ do
existing_tags_nginx[$tag]=1
fi
done
headers=$(cat /tmp/headers.txt)
while read header
do
header=$(echo $header | sed -r 's/\s+//g')
......@@ -109,7 +109,7 @@ do
if [[ ! -v revision_tags_nginx["$nginx_tag"] ]]
then
echo $nginx_tag
curl --fail --silent -X DELETE -H "JOB-TOKEN: $CI_JOB_TOKEN" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/registry/repositories/$FPM_REPOSITORY_ID/tags/$nginx_tag"
curl --fail --silent -X DELETE -H "JOB-TOKEN: $CI_JOB_TOKEN" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/registry/repositories/$NGINX_REPOSITORY_ID/tags/$nginx_tag"
echo ""
fi
done
\ No newline at end of file
......@@ -52,13 +52,13 @@ done
for fpm_tag in ${!expired_fpm_tags[@]}
do
echo "Deleting fpm tag $fpm_tag"
curl --fail -X DELETE -H "JOB-TOKEN: $CI_JOB_TOKEN" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/registry/repositories/$FPM_REPOSITORY_ID/tags/$fpm_tag"
curl --fail --silent -X DELETE -H "JOB-TOKEN: $CI_JOB_TOKEN" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/registry/repositories/$FPM_REPOSITORY_ID/tags/$fpm_tag"
echo ""
done
# Delete all gathered nginx tags
for nginx_tag in ${!expired_nginx_tags[@]}
do
echo "Deleting nginx tag $nginx_tag"
curl --fail -X DELETE -H "JOB-TOKEN: $CI_JOB_TOKEN" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/registry/repositories/$FPM_REPOSITORY_ID/tags/$nginx_tag"
curl --fail --silent -X DELETE -H "JOB-TOKEN: $CI_JOB_TOKEN" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/registry/repositories/$FPM_REPOSITORY_ID/tags/$nginx_tag"
echo ""
done
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment