From 4047456c1370da9558add77d3ba9cd2c5d9bb399 Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Fri, 25 Aug 2023 13:33:14 +0000
Subject: [PATCH] fix: avoid clean registry script

---
 .gitlab-ci.yml | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cbf9fd896..cd3bcf6b9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -507,7 +507,12 @@ clean:
     - docker-new
   when: always
   script:
-    ## remove the pipeline specific export from eicweb if needed
+    - apk add curl
+    - for id in 66 68 69 80 83 91 92 ; do
+        for tag in ${INTERNAL_TAG} ${INTERNAL_TAG}-default ${INTERNAL_TAG}-nightly ; do 
+          curl --request DELETE --header "PRIVATE-TOKEN: ${REG_CLEANUP_TOKEN}" ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/registry/repositories/${id}/tags/${tag} ;
+        done ;
+      done
     - echo "Cleaning up pipeline specific docker tags if needed"
     - bash ./gitlab-ci/cleanup_registry.sh -i debian_base -r 66 ${INTERNAL_TAG}
     - bash ./gitlab-ci/cleanup_registry.sh -i ubuntu_base -r 80 ${INTERNAL_TAG}
@@ -534,8 +539,7 @@ clean_unstable_mr:
   variables:
     API: "https://eicweb.phy.anl.gov/api/v4"
   script:
-    - apt update -q
-    - apt install -yq jq
+    - apk add curl jq
     - for registry in
         eicweb
         eicweb.phy.anl.gov:4567/eic/juggler
-- 
GitLab