summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-10-29 21:38:56 +0000
committerGerrit Code Review <review@openstack.org>2018-10-29 21:38:56 +0000
commit2e003450cceb16b9bda71aa69a939a8466516582 (patch)
treee86bfa289f801c8ae4fbdbc0bcdf05fa65362f4b
parente80d4e58ebd2ad00ca33037e8aef2447b1b7859f (diff)
parent24991ffb81464d2869d4249fed4e0addb191604e (diff)
Merge "Fix: adding back the possibility to add arbitrary labels"
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 949a1ed..14fd1c1 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,9 @@ PROXY ?= http://proxy.foo.com:8000
26NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local 26NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local
27USE_PROXY ?= false 27USE_PROXY ?= false
28PUSH_IMAGE ?= false 28PUSH_IMAGE ?= false
29COMMIT ?= commit-id 29# use this variable for image labels added in internal build process
30LABEL ?= com.internal
31COMMIT ?= $(shell git rev-parse HEAD)
30IMAGE_NAME := maas-rack-controller maas-region-controller sstream-cache 32IMAGE_NAME := maas-rack-controller maas-region-controller sstream-cache
31BUILD_DIR := $(shell mktemp -d) 33BUILD_DIR := $(shell mktemp -d)
32HELM := $(BUILD_DIR)/helm 34HELM := $(BUILD_DIR)/helm
@@ -67,7 +69,7 @@ helm-install:
67.PHONY: build 69.PHONY: build
68build: 70build:
69ifeq ($(USE_PROXY), true) 71ifeq ($(USE_PROXY), true)
70 docker build -t $(IMAGE) --network=host \ 72 docker build -t $(IMAGE) --label $(LABEL) --network=host \
71 --label "org.opencontainers.image.revision=$(COMMIT)" \ 73 --label "org.opencontainers.image.revision=$(COMMIT)" \
72 --label "org.opencontainers.image.created=$(shell date --rfc-3339=seconds --utc)" \ 74 --label "org.opencontainers.image.created=$(shell date --rfc-3339=seconds --utc)" \
73 --label "org.opencontainers.image.title=$(IMAGE_NAME)" \ 75 --label "org.opencontainers.image.title=$(IMAGE_NAME)" \
@@ -82,7 +84,7 @@ ifeq ($(USE_PROXY), true)
82 --build-arg SSTREAM_IMAGE=$(SSTREAM_IMAGE) \ 84 --build-arg SSTREAM_IMAGE=$(SSTREAM_IMAGE) \
83 $(IMAGE_DIR) 85 $(IMAGE_DIR)
84else 86else
85 docker build -t $(IMAGE) --network=host \ 87 docker build -t $(IMAGE) --label $(LABEL) --network=host \
86 --label "org.opencontainers.image.revision=$(COMMIT)" \ 88 --label "org.opencontainers.image.revision=$(COMMIT)" \
87 --label "org.opencontainers.image.created=$(shell date --rfc-3339=seconds --utc)" \ 89 --label "org.opencontainers.image.created=$(shell date --rfc-3339=seconds --utc)" \
88 --label "org.opencontainers.image.title=$(IMAGE_NAME)" \ 90 --label "org.opencontainers.image.title=$(IMAGE_NAME)" \