From 0cf79f7354867b6b5dd8cae7a0693e5ff246869c Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 27 Jun 2023 09:33:57 +1000 Subject: [PATCH] Only use HTTP proxy if environment defined --- .gitlab-docker-x86_64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-docker-x86_64.yml b/.gitlab-docker-x86_64.yml index dd19aa0..aa5304d 100644 --- a/.gitlab-docker-x86_64.yml +++ b/.gitlab-docker-x86_64.yml @@ -6,7 +6,7 @@ x86_64:build: - if [ -f init ]; then chmod 500 init; fi - ([ -z "$REFRESH" -a -f build-cache/${CI_COMMIT_REF_SLUG} ]) && docker load < build-cache/${CI_COMMIT_REF_SLUG} || true - rm build-cache/* || true - - docker build --build-arg HTTP_PROXY=http://proxy.dege.lan:3128 --cache-from ${CI_REGISTRY_IMAGE}:${VERSIONARCH} -t ${CI_REGISTRY_IMAGE}:${VERSIONARCH} . + - docker build ${HTTP_PROXY:+--build-arg HTTP_PROXY=${HTTP_PROXY}} --cache-from ${CI_REGISTRY_IMAGE}:${VERSIONARCH} -t ${CI_REGISTRY_IMAGE}:${VERSIONARCH} . - docker push ${CI_REGISTRY_IMAGE}:${VERSIONARCH} - docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > build-cache/${CI_COMMIT_REF_SLUG} tags: