summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStacey Fletcher <staceylynnfletcher@gmail.com>2018-06-15 11:55:25 -0500
committerStacey Fletcher <staceylynnfletcher@gmail.com>2018-06-15 17:04:58 +0000
commit8adc845af51927ff0ead24d4027a803a5bc644d0 (patch)
treed8eb7a6ce6703696a5b1914c8ea2b9e712a5458f
parent8805637db501b7d9e51e3b4e5b7bc2986121756c (diff)
Add ARG to MAAS SimpleStream Dockerfile
This allows the simplestream repo to be passed at build time. Change-Id: I7c854bd04366ec145f0ae5b7e3b166c2201ff740
Notes
Notes (review): Code-Review+2: Mark Burnett <mark.m.burnett@gmail.com> Code-Review+2: Pete Birley <pete@port.direct> Workflow+1: Pete Birley <pete@port.direct> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Sat, 16 Jun 2018 15:57:49 +0000 Reviewed-on: https://review.openstack.org/575792 Project: openstack/airship-maas Branch: refs/heads/master
-rw-r--r--Makefile5
-rw-r--r--images/sstream-cache/Dockerfile3
2 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index a76d705..0697ab9 100644
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,7 @@ LABEL ?= commit-id
29IMAGE_NAME := maas-rack-controller maas-region-controller sstream-cache 29IMAGE_NAME := maas-rack-controller maas-region-controller sstream-cache
30BUILD_DIR := $(shell mktemp -d) 30BUILD_DIR := $(shell mktemp -d)
31HELM := $(BUILD_DIR)/helm 31HELM := $(BUILD_DIR)/helm
32SSTREAM_IMAGE := "https://images.maas.io/ephemeral-v3/daily/"
32 33
33.PHONY: images 34.PHONY: images
34#Build all images in the list 35#Build all images in the list
@@ -64,9 +65,9 @@ helm-install:
64.PHONY: build 65.PHONY: build
65build: 66build:
66ifeq ($(USE_PROXY), true) 67ifeq ($(USE_PROXY), true)
67 docker build -t $(IMAGE) --label $(LABEL) -f $(IMAGE_DIR)/Dockerfile --build-arg http_proxy=$(PROXY) --build-arg https_proxy=$(PROXY) $(IMAGE_DIR) 68 docker build -t $(IMAGE) --label $(LABEL) -f $(IMAGE_DIR)/Dockerfile --build-arg SSTREAM_IMAGE=$(SSTREAM_IMAGE) --build-arg http_proxy=$(PROXY) --build-arg https_proxy=$(PROXY) $(IMAGE_DIR)
68else 69else
69 docker build -t $(IMAGE) --label $(LABEL) -f $(IMAGE_DIR)/Dockerfile $(IMAGE_DIR) 70 docker build -t $(IMAGE) --label $(LABEL) --build-arg SSTREAM_IMAGE=$(SSTREAM_IMAGE) -f $(IMAGE_DIR)/Dockerfile $(IMAGE_DIR)
70endif 71endif
71ifeq ($(PUSH_IMAGE), true) 72ifeq ($(PUSH_IMAGE), true)
72 docker push $(IMAGE) 73 docker push $(IMAGE)
diff --git a/images/sstream-cache/Dockerfile b/images/sstream-cache/Dockerfile
index dbeba6e..d1f145a 100644
--- a/images/sstream-cache/Dockerfile
+++ b/images/sstream-cache/Dockerfile
@@ -1,6 +1,7 @@
1FROM ubuntu:16.04 1FROM ubuntu:16.04
2 2
3ENV IMAGE_SRC https://images.maas.io/ephemeral-v3/daily/ 3ARG SSTREAM_IMAGE=https://images.maas.io/ephemeral-v3/daily/
4ENV IMAGE_SRC ${SSTREAM_IMAGE}
4 5
5RUN apt-get -qq update && \ 6RUN apt-get -qq update && \
6 apt install -y simplestreams \ 7 apt install -y simplestreams \