-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile
82 lines (63 loc) · 1.77 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.PHONY: install-frontend
install-frontend:
cd web && npm install
.PHONY: install-frontend-ci
install-frontend-ci:
cd web && npm ci --omit=optional --ignore-scripts
.PHONY: install-frontend-ci-clean
install-frontend-ci-clean: install-frontend-ci
cd web && npm cache clean
.PHONY: build-frontend
build-frontend:
cd web && npm run build
.PHONY: start-frontend
start-frontend:
cd web && npm run start
.PHONY: start-console
start-console:
./scripts/start-console.sh
.PHONY: i18n-frontend
i18n-frontend:
cd web && npm run i18n
.PHONY: lint-frontend
lint-frontend:
cd web && npm run lint
.PHONY: lint-backend
lint-backend:
go mod tidy
go fmt ./cmd/
go fmt ./pkg/
.PHONY: install-backend
install-backend:
go mod download
.PHONY: build-backend
build-backend:
go build $(BUILD_OPTS) -mod=readonly -o plugin-backend cmd/plugin-backend.go
.PHONY: start-backend
start-backend:
go run ./cmd/plugin-backend.go -port='9001' -config-path='./web/dist' -static-path='./web/dist' -plugin-config-path='ct.yaml'
.PHONY: build-image
build-image:
./scripts/build-image.sh
.PHONY: install
install:
make install-frontend && make install-backend
.PHONY: update-plugin-name
update-plugin-name:
./scripts/update-plugin-name.sh
export REGISTRY_ORG?=openshift-observability-ui
export TAG?=latest
export PLUGIN_NAME?=monitoring-plugin
IMAGE=quay.io/${REGISTRY_ORG}/monitoring-plugin:${TAG}
.PHONY: deploy
deploy:
make lint-backend
PUSH=1 scripts/build-image.sh
helm uninstall $(PLUGIN_NAME) -n $(PLUGIN_NAME)-ns || true
helm install $(PLUGIN_NAME) charts/openshift-console-plugin -n monitoring-plugin-ns --create-namespace --set plugin.image=$(IMAGE)
.PHONY: deploy-acm
deploy-acm:
./scripts/deploy-acm.sh
.PHONY: build-mcp-image
build-mcp-image:
DOCKER_FILE_NAME="Dockerfile.mcp" scripts/build-image.sh