wmj-test/Makefile

31 lines
548 B
Makefile

TAG ?= v1.1.10
IMAGE_TAG ?= docker.educg.net/cg/k8s-manager:$(TAG)
build: export CGO_ENABLED=0
build: export GOOS=linux
build: export GOARCH=amd64
build:
go build -o out/manager main.go
docker:
docker build --rm -t $(IMAGE_TAG) .
install: docker
kubectl apply -f install.yaml
uninstall:
kubectl delete -f install.yaml
restart: docker
kubectl delete -f install.yaml
kubectl apply -f install.yaml
push: docker
docker push $(IMAGE_TAG)
tag:
git add .
git commit -m $(TAG)
git tag $(TAG)
git push origin master
git push origin $(TAG)