[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 02/25] tests/docker: don't use BUILDKIT in GitLab either

From: Wainer dos Santos Moschetta
Subject: Re: [PATCH v2 02/25] tests/docker: don't use BUILDKIT in GitLab either
Date: Fri, 15 Jan 2021 10:53:34 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0


On 1/14/21 10:02 AM, Daniel P. Berrangé wrote:
Using BUILDKIT breaks with certain container registries such as CentOS,
with docker build reporting an error such as

   failed to solve with frontend dockerfile.v0:
   failed to build LLB: failed to load cache key:
   unexpected status code
   403 Forbidden

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
  tests/docker/docker.py | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 36b7868406..d1d0da9419 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -222,7 +222,9 @@ class Docker(object):
      def __init__(self):
          self._command = _guess_engine_command()
- if "docker" in self._command and "TRAVIS" not in os.environ:
+        if ("docker" in self._command and
+            "TRAVIS" not in os.environ and
+            "CI" not in os.environ):

The variable CI is also exported in Travis. But if you want to keep this guard specific to gitlab then you can use GITLAB_CI.

- Wainer

              os.environ["DOCKER_BUILDKIT"] = "1"
              self._buildkit = True

reply via email to

[Prev in Thread] Current Thread [Next in Thread]