diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 63f6976104c1c539d7ac9e9ec5e0f9f97e9bb0b5..4f107b738b85ac57da82e59876f568b89d0846b2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -697,7 +697,7 @@ wordpress-taiko: # === -# Terminates a droplet and deletes a container once the MR for it is merged +# Terminates a droplet and deletes the branch container image once the MR for it is merged terminate-droplet: # Stage has to be the same as the step that created the VPS # https://docs.gitlab.com/ee/ci/environments.html#automatically-stopping-an-environment @@ -710,7 +710,7 @@ terminate-droplet: - *debug_information # Delete droplet - python3 -c "import greenhost_cloud; greenhost_cloud.terminate_droplets_by_name(\"^${CI_COMMIT_REF_SLUG}\")" - # Delete container if one was created + # Delete container image if one was created - "if [ \"$CI_CONTAINER_TAG\" != \"master\" ]; then curl --request DELETE --header \"PRIVATE-TOKEN: ${CLEANER_TOKEN}\" https://open.greenhost.net/api/v4/projects/openappstack%2Fopenappstack/registry/repositories/2/tags/${CI_CONTAINER_TAG}; fi" environment: name: $CI_COMMIT_REF_SLUG