-
Notifications
You must be signed in to change notification settings - Fork 133
/
Makefile
22 lines (19 loc) · 806 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
default: docker_build
include .env
# Note:
# Latest version of kubectl may be found at: https://github.com/kubernetes/kubernetes/releases
# Latest version of helm may be found at: https://github.com/kubernetes/helm/releases
# Latest version of yq may be found at: https://github.com/mikefarah/yq/releases
VARS:=$(shell sed -ne 's/ *\#.*$$//; /./ s/=.*$$// p' .env )
$(foreach v,$(VARS),$(eval $(shell echo export $(v)="$($(v))")))
DOCKER_IMAGE ?= dtzar/helm-kubectl
DOCKER_TAG ?= `git rev-parse --abbrev-ref HEAD`
docker_build:
@docker buildx build \
--build-arg KUBE_VERSION=$(KUBE_VERSION) \
--build-arg HELM_VERSION=$(HELM_VERSION) \
--build-arg YQ_VERSION=$(YQ_VERSION) \
-t $(DOCKER_IMAGE):$(DOCKER_TAG) .
docker_push:
# Push to DockerHub
docker push $(DOCKER_IMAGE):$(DOCKER_TAG)