Extend build command to work for any image in the images folder
This commit is contained in:
parent
51cd8ae0ca
commit
47427d6a28
8
Makefile
8
Makefile
|
@ -140,12 +140,12 @@ config/$(ENVIRONMENT).tfbackend: $(OUT_DIGEST) infra/backend/$(ENVIRONMENT).tfst
|
||||||
-state $(ENVIRONMENT).tfstate' \
|
-state $(ENVIRONMENT).tfstate' \
|
||||||
)
|
)
|
||||||
|
|
||||||
build-tools: REVISION = $(shell git rev-list -1 HEAD -- images/tools)
|
build-%: REVISION = $(shell git rev-list -1 HEAD -- images/$*)
|
||||||
build-tools: SOURCE_DATE_EPOCH = $(shell git log -1 --format=%ct $(REVISON))
|
build-%: SOURCE_DATE_EPOCH = $(shell git log -1 --format=%ct $(REVISION))
|
||||||
build-tools: images/tools/Containerfile | out
|
build-%: images/tools/Containerfile | out
|
||||||
export SOURCE_DATE_EPOCH
|
export SOURCE_DATE_EPOCH
|
||||||
cd images/tools
|
cd images/tools
|
||||||
$(call build-container,tools,$(VERSION),$<,$(SOURCE_DATE_EPOCH),$(REVISION))
|
$(call build-container,$*,$(VERSION),$<,$(SOURCE_DATE_EPOCH),$(REVISION))
|
||||||
|
|
||||||
out/tools-image.digest: out build-tools
|
out/tools-image.digest: out build-tools
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue