Merge lp:~ricardokirkner/isitdeployable/docker-build-arg-http-proxy into lp:isitdeployable

Proposed by Ricardo Kirkner
Status: Merged
Approved by: Ricardo Kirkner
Approved revision: 231
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: lp:~ricardokirkner/isitdeployable/docker-build-arg-http-proxy
Merge into: lp:isitdeployable
Diff against target: 25 lines (+7/-1)
1 file modified
Makefile.k8s (+7/-1)
To merge this branch: bzr merge lp:~ricardokirkner/isitdeployable/docker-build-arg-http-proxy
Reviewer Review Type Date Requested Status
Ricardo Kirkner (community) Approve
Review via email: mp+329032@code.launchpad.net

Commit message

pass http proxy as build-arg if defined in environ

To post a comment you must log in.
Revision history for this message
Ricardo Kirkner (ricardokirkner) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile.k8s'
--- Makefile.k8s 2017-08-14 19:34:53 +0000
+++ Makefile.k8s 2017-08-15 11:51:31 +0000
@@ -13,6 +13,8 @@
13TLS_CRT ?= $(shell cat deployment/$(DOMAIN).crt | base64 -w0)13TLS_CRT ?= $(shell cat deployment/$(DOMAIN).crt | base64 -w0)
14TLS_KEY ?= $(shell cat deployment/$(DOMAIN).key | base64 -w0)14TLS_KEY ?= $(shell cat deployment/$(DOMAIN).key | base64 -w0)
1515
16HTTP_PROXY ?= $(http_proxy)
17
16# public targets18# public targets
1719
18k8s-bootstrap: $(ENV) fetch-sourcedeps ## Bootstrap k8s environment20k8s-bootstrap: $(ENV) fetch-sourcedeps ## Bootstrap k8s environment
@@ -28,7 +30,11 @@
28k8s-build: fetch-sourcedeps ## Build container image30k8s-build: fetch-sourcedeps ## Build container image
29 @echo 'Building image on:' $(shell lsb_release -cs)31 @echo 'Building image on:' $(shell lsb_release -cs)
30 @echo 'Building image using docker version:' $(shell docker version -f "Server: {{.Server.Version}} Client: {{.Client.Version}}")32 @echo 'Building image using docker version:' $(shell docker version -f "Server: {{.Server.Version}} Client: {{.Client.Version}}")
31 docker build --build-arg BUILD_REVISION="r$(shell bzr revno)" -t $(IMAGE_NAME):$(IMAGE_TAG) .33 $(eval BUILD_ARGS = --build-arg BUILD_REVISION="r$(shell bzr revno)")
34ifneq ($(HTTP_PROXY),)
35 $(eval BUILD_ARGS = $(BUILD_ARGS) --build-arg HTTP_PROXY=$(HTTP_PROXY))
36endif
37 docker build $(BUILD_ARGS) -t $(IMAGE_NAME):$(IMAGE_TAG) .
3238
33k8s-upload: ## Upload image to registry39k8s-upload: ## Upload image to registry
34 docker tag $(IMAGE_NAME):$(IMAGE_TAG) $(DOCKER_REGISTRY)/$(IMAGE_NAME):$(IMAGE_TAG) 40 docker tag $(IMAGE_NAME):$(IMAGE_TAG) $(DOCKER_REGISTRY)/$(IMAGE_NAME):$(IMAGE_TAG)

Subscribers

People subscribed via source and target branches