forked from kubernetes-sigs/kube-scheduler-simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (45 loc) · 1.02 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
.PHONY: tools
tools:
cd ./tools; \
cat tools.go | grep "_" | awk -F'"' '{print $$2}' | xargs -tI % go install %
.PHONY: generate
generate:
go generate ./...
.PHONY: lint
lint:
golangci-lint run --timeout 30m ./...
.PHONY: format
format:
golangci-lint run --fix ./...
.PHONY: test
test:
go test ./...
.PHONY: mod-download
mod-download: ## Downloads the Go module
go mod download -x
.PHONY: build
build:
go build -o ./bin/simulator ./simulator.go
.PHONY: start
start: build
./hack/start_simulator.sh
# re-generate openapi file for running api-server
.PHONY: openapi
openapi:
./hack/openapi.sh
.PHONY: docker_build
docker_build: docker_build_server docker_build_front
.PHONY: docker_build_server
docker_build_server:
docker build -t simulator-server .
.PHONY: docker_build_front
docker_build_front:
docker build -t simulator-frontend ./web/
.PHONY: docker_up
docker_up:
docker-compose up -d
.PHONY: docker_build_and_up
docker_build_and_up: docker_build docker_up
.PHONY: docker_down
docker_down:
docker-compose down