-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
29 lines (21 loc) · 869 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
# Image URL to use all building/pushing image targets
IMG_FRONTEND ?= hub.c.163.com/kubediag/kubediag-dashboard-frontend
IMG_BACKEND ?= hub.c.163.com/kubediag/kubediag-dashboard-backend
# Image build dockerfile
DOCKERFILE_FRONTEND ?= Dockerfile-frontend.arch
DOCKERFILE_BACKEND ?= Dockerfile-backend.arch
# Image tag to use all building/pushing image targets
TAG ?= $(shell git rev-parse --short HEAD)
all: kubediag
# Deploy controller in the configured Kubernetes cluster in ~/.kube/config
deploy: manifests
kubectl apply -f config/deploy
# Build the frontend docker image
docker-build-frontend: test
docker build . -f ${DOCKERFILE_FRONTEND} -t ${IMG_FRONTEND}:${TAG}
# Build the backend docker image
docker-build-backend: test
docker build . -f ${DOCKERFILE_BACKEND} -t ${IMG_BACKEND}:${TAG}
# Push the docker image
docker-push:
docker push ${IMG}:${TAG}