From 4803d4d01a80c94e2f90f9ac57c6c44342e957d2 Mon Sep 17 00:00:00 2001
From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Date: Tue, 4 Jun 2024 19:52:19 -0400
Subject: [PATCH] Revert "fix: remove --no-cache again"

This reverts commit 8c4e2e17f285e3b7b0f571039ba94beecef607c4.
---
 .gitlab-ci.yml | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 499484ffa..c8f1e64ff 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -32,7 +32,7 @@ variables:
   NIGHTLY_TAG: "nightly"
 
   ## Additional options for docker build (e.g. --no-cache)
-  BUILD_OPTIONS: ""
+  BUILD_OPTIONS: "--no-cache"
 
   ## Version to be set by external trigger
   VERSION: ""
@@ -268,8 +268,7 @@ base:
   needs:
     - version
   script:
-    - while !
-      docker buildx build --push ${BUILD_OPTIONS}
+    - docker buildx build --push ${BUILD_OPTIONS}
                    --tag ${CI_REGISTRY}/${CI_PROJECT_PATH}/${BUILD_IMAGE}:${INTERNAL_TAG}
                    ${EXPORT_TAG:+
                      ${CI_PUSH:+--tag ${CI_REGISTRY}/${CI_PROJECT_PATH}/${BUILD_IMAGE}:${EXPORT_TAG}}
@@ -283,13 +282,6 @@ base:
                    --provenance false
                    containers/debian
                    2>&1 | tee build.log
-      ; do
-        if grep "unknown blob" build.log ; then
-          BUILD_OPTIONS="--no-cache ${BUILD_OPTIONS}" ;
-        else
-          exit 1 ;
-        fi
-      done
 
 
 eic:
@@ -352,8 +344,7 @@ eic:
       source eic-spack.sh ;
       export SPACK_VERSION ;
       cat mirrors.yaml.in | envsubst > mirrors.yaml
-    - while !
-      docker buildx build --push ${BUILD_OPTIONS}
+    - docker buildx build --push ${BUILD_OPTIONS}
                    --tag ${CI_REGISTRY}/${CI_PROJECT_PATH}/${BUILD_IMAGE}${ENV}:${INTERNAL_TAG}-${BUILD_TYPE}
                    --tag ${CI_REGISTRY}/${CI_PROJECT_PATH}/${BUILD_IMAGE/eic/jug}${ENV}:${INTERNAL_TAG}-${BUILD_TYPE}
                    ${EXPORT_TAG:+
@@ -424,13 +415,7 @@ eic:
                    --provenance false
                    containers/jug
                    2>&1 | tee build.log
-      ; do
-        if grep "unknown blob" build.log ; then
-          BUILD_OPTIONS="--no-cache ${BUILD_OPTIONS}" ;
-        else
-          exit 1 ;
-        fi
-      done
+
 
 .singularity:
   image:
-- 
GitLab