Only use HTTP proxy if environment defined
This commit is contained in:
parent
68fd0ff94e
commit
0cf79f7354
@ -6,7 +6,7 @@ x86_64:build:
|
|||||||
- if [ -f init ]; then chmod 500 init; fi
|
- 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
|
- ([ -z "$REFRESH" -a -f build-cache/${CI_COMMIT_REF_SLUG} ]) && docker load < build-cache/${CI_COMMIT_REF_SLUG} || true
|
||||||
- rm build-cache/* || 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 push ${CI_REGISTRY_IMAGE}:${VERSIONARCH}
|
||||||
- docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > build-cache/${CI_COMMIT_REF_SLUG}
|
- docker save ${CI_REGISTRY_IMAGE}:${VERSIONARCH} > build-cache/${CI_COMMIT_REF_SLUG}
|
||||||
tags:
|
tags:
|
||||||
|
Loading…
Reference in New Issue
Block a user