Unifying proxy variables for tox and docker build
This patch adds proxy-related variables to tox and 'docker build' commands. Change-Id: I29fee630bd4c98406797ffec93f8f80bf1a3a043
This commit is contained in:
parent
b93cf21fa2
commit
7613f1c624
9
Makefile
9
Makefile
|
@ -19,6 +19,7 @@ IMAGE_PREFIX ?= airshipit
|
||||||
IMAGE_TAG ?= dev
|
IMAGE_TAG ?= dev
|
||||||
HELM := $(BUILD_DIR)/helm
|
HELM := $(BUILD_DIR)/helm
|
||||||
PROXY ?= http://proxy.foo.com:8000
|
PROXY ?= http://proxy.foo.com:8000
|
||||||
|
NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local
|
||||||
USE_PROXY ?= false
|
USE_PROXY ?= false
|
||||||
PUSH_IMAGE ?= false
|
PUSH_IMAGE ?= false
|
||||||
LABEL ?= commit-id
|
LABEL ?= commit-id
|
||||||
|
@ -97,7 +98,13 @@ helm-install:
|
||||||
.PHONY: build_drydock
|
.PHONY: build_drydock
|
||||||
build_drydock:
|
build_drydock:
|
||||||
ifeq ($(USE_PROXY), true)
|
ifeq ($(USE_PROXY), true)
|
||||||
docker build --network host -t $(IMAGE) --label $(LABEL) -f images/drydock/Dockerfile . --build-arg http_proxy=$(PROXY) --build-arg https_proxy=$(PROXY)
|
docker build --network host -t $(IMAGE) --label $(LABEL) -f images/drydock/Dockerfile \
|
||||||
|
--build-arg http_proxy=$(PROXY) \
|
||||||
|
--build-arg https_proxy=$(PROXY) \
|
||||||
|
--build-arg HTTP_PROXY=$(PROXY) \
|
||||||
|
--build-arg HTTPS_PROXY=$(PROXY) \
|
||||||
|
--build-arg no_proxy=$(NO_PROXY) \
|
||||||
|
--build-arg NO_PROXY=$(NO_PROXY) .
|
||||||
else
|
else
|
||||||
docker build --network host -t $(IMAGE) --label $(LABEL) -f images/drydock/Dockerfile .
|
docker build --network host -t $(IMAGE) --label $(LABEL) -f images/drydock/Dockerfile .
|
||||||
endif
|
endif
|
||||||
|
|
1
tox.ini
1
tox.ini
|
@ -4,6 +4,7 @@ envlist = py35,pep8,bandit
|
||||||
[testenv]
|
[testenv]
|
||||||
setenv = YAMLDIR = {toxinidir}/tests/yaml_samples/
|
setenv = YAMLDIR = {toxinidir}/tests/yaml_samples/
|
||||||
basepython=python3
|
basepython=python3
|
||||||
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
||||||
deps=
|
deps=
|
||||||
-rrequirements-lock.txt
|
-rrequirements-lock.txt
|
||||||
-rrequirements-test.txt
|
-rrequirements-test.txt
|
||||||
|
|
Loading…
Reference in New Issue