-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
55 lines (45 loc) · 1.74 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
SHELLOPTS := $(if $(SHELLOPTS),$(SHELLOPTS):, )xtrace pipefail errexit nounset
.PHONY: post-create
post-create:
./scripts/post-create.sh
.PHONY: post-start
post-start:
@echo "post-start"
.PHONY: docs
docs:
terraform-docs markdown . > ./README.md.new
terraform-docs markdown examples/k3s > examples/k3s/README.md.new
terraform-docs markdown examples/k3s-existing-istio > examples/k3s-existing-istio/README.md.new
terraform-docs markdown examples/aks > examples/aks/README.md.new
terraform-docs markdown examples/eks-https-loadbalancer > examples/eks-https-loadbalancer/README.md.new
.PHONY: docs-rm-new
docs-rm-new:
rm -f ./README.md.new
rm -f examples/k3s/README.md.new
rm -f examples/k3s-existing-istio/README.md.new
rm -f examples/aks/README.md.new
rm -f examples/eks-https-loadbalancer/README.md.new
fmt:
terraform fmt . examples/*
.PHONY: k3d-create
k3d-create:
k3d cluster create dev \
-p "80:80@loadbalancer" \
-p "443:443@loadbalancer" \
--k3s-arg '--disable=traefik@server:0'
.PHONY: k3d-delete
k3d-delete:
k3d cluster delete dev
TIMESTAMP := $(shell date -u "+%Y-%m-%d-T%H-%M-%S")
GIT_TAG := $(shell git describe --tags `git rev-list --tags --max-count=1` | sed 's/^v//')
VERSION ?= $(if $(filter $(PROD),true),$(GIT_TAG),$(GIT_TAG)-dev+$(TIMESTAMP))
build-chart:
rm -rf helm/*.tgz
helm package helm/kubeflow-core -d helm --version $(VERSION)
yq eval '.targetRevision = "$(VERSION)"' -i helm/kubeflow/values.yaml
helm package helm/kubeflow -d helm --version $(VERSION)
push-chart: build-chart
helm push helm/kubeflow-core-$(VERSION).tgz oci://ghcr.io/treebeardtech/helm
helm push helm/kubeflow-$(VERSION).tgz oci://ghcr.io/treebeardtech/helm
helm-repo-login:
echo $(GHCR_PAT) | docker login ghcr.io -u $(USERNAME) --password-stdin