-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (26 loc) · 906 Bytes
/
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
TAG?=2.2.0
NAME:=gateway-api
DOCKER_REPOSITORY:=blacklee123
DOCKER_IMAGE_NAME:=$(DOCKER_REPOSITORY)/$(NAME)
VERSION:=2.2.0
EXTRA_RUN_ARGS?=
.PHONY: test
test-version:
@echo "$(VERSION)"
build:
docker buildx build --platform linux/amd64 -f Dockerfile -t $(DOCKER_IMAGE_NAME):$(VERSION) .
push:
docker tag $(DOCKER_IMAGE_NAME):$(VERSION) $(DOCKER_IMAGE_NAME):latest
docker push $(DOCKER_IMAGE_NAME):$(VERSION)
docker push $(DOCKER_IMAGE_NAME):latest
version-set:
next="$(TAG)" && \
current="$(VERSION)" && \
sed -i '' "s/$$NAME:$$current/$$NAME:$$next/g" kustomize/deployment.yaml && \
sed -i '' "s/<version>$$current<\/version>/<version>$$next<\/version>/g" pom.xml && \
echo "Version $$next set in pom, deployment , Dockerfile"
release:
git tag $(VERSION)
git push origin $(VERSION)
rollout: build push
kubectl rollout restart -n qaq-dev deployment $(NAME)