Skip to content

Commit

Permalink
Merge pull request #4 from manuelbuil/main
Browse files Browse the repository at this point in the history
Add build date to the tag
  • Loading branch information
manuelbuil authored Mar 10, 2021
2 parents a2f0529 + d1c0aea commit 5b4db8f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,24 @@ ifeq ($(ARCH),)
ARCH=$(shell go env GOARCH)
endif

BUILD_META=-build$(shell date +%Y%m%d)
ORG ?= rancher
TAG ?= v3.6
TAG ?= v3.6$(BUILD_META)

ifneq ($(DRONE_TAG),)
TAG := $(DRONE_TAG)
endif

ifeq (,$(filter %$(BUILD_META),$(TAG)))
$(error TAG needs to end with build metadata: $(BUILD_META))
endif

.PHONY: image-build
image-build:
docker build \
--pull \
--build-arg ARCH=$(ARCH) \
--build-arg TAG=$(TAG) \
--build-arg TAG=$(TAG:$(BUILD_META)=) \
--tag $(ORG)/hardened-multus-cni:$(TAG) \
--tag $(ORG)/hardened-multus-cni:$(TAG)-$(ARCH) \
.
Expand Down

0 comments on commit 5b4db8f

Please sign in to comment.