-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
81 lines (66 loc) · 2.67 KB
/
Copy pathMakefile
File metadata and controls
81 lines (66 loc) · 2.67 KB
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
.DEFAULT_GOAL := help
SHELL := /bin/bash
#help: @ list available tasks on this project
help:
@grep -E '[a-zA-Z\.\-]+:.*?@ .*$$' $(MAKEFILE_LIST)| tr -d '#' | awk 'BEGIN {FS = ":.*?@ "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
#build: @ build artifact
build:
@yarn build && go generate pkg/app/server.go && go build cmd/monitoring/main.go
#build.front: @ build front with parcel and run go generate
build.front:
@yarn build && go generate pkg/app/server.go
#graphql.generate: @ generate graphql model and resolvers
graphql.generate:
go run github.com/99designs/gqlgen generate
#test.unit: @ run unit tests and coverage
test.unit:
npm ci
make build.front
@echo "[TEST.UNIT] run unit tests and coverage"
go test -covermode=atomic -coverprofile=coverage.out \
github.com/bigblueswarm/monitoring/pkg/app \
github.com/bigblueswarm/monitoring/pkg/auth \
github.com/bigblueswarm/monitoring/pkg/config \
github.com/bigblueswarm/monitoring/pkg/pointer \
github.com/bigblueswarm/monitoring/pkg/service
npm test
#clean: @ clean builds and statics
clean:
@rm -rf main dist pkg/app/dist .cache .parcel-cache
#scripts: @ download scripts
scripts:
@echo "[SCRIPTS] install bigblueswarm scripts"
git clone https://github.com/bigblueswarm/bbs-scripts scripts
#init: @ install project and init dependencies
init:
@echo "[INIT] Install project and init dependencies"
@echo "[INIT][1/3] install and setup pre-commit"
pip install pre-commit
pre-commit --version
pre-commit install
@echo "[INIT][2/3] commitlint, conventional commit, husky and newman installation"
npm install --save-dev @commitlint/{config-conventional,cli} husky
npx husky install
npx husky add .husky/commit-msg "npx --no -- commitlint --edit \"$1\""
@echo "[INIT][3/3] download development scripts"
git clone https://github.com/bigblueswarm/bbs-scripts scripts
#cluster.init: @ initialize development cluster (initialize influxdb and telegraf)
cluster.init: cluster.influxdb cluster.telegraf
#cluster.start: @ start development cluster
cluster.start:
@make -f ./scripts/Makefile cluster.start
#cluster.stop: @ stop development cluster
cluster.stop:
@make -f ./scripts/Makefile cluster.stop
#cluster.influxdb: @ initialize influxdb database
cluster.influxdb:
@make -f ./scripts/Makefile cluster.influxdb
#cluster.telegraf: @ initialize bigbluebutton telegraf configuration
cluster.telegraf:
@make -f ./scripts/Makefile cluster.telegraf
#cluster.consul: @ start development cluster using consul coniguration provider
cluster.consul:
@make -f ./scripts/Makefile cluster.consul
#cluster.bigblueswarm: @ start development cluster using bigblueswarm image
cluster.bigblueswarm:
@make -f ./scripts/Makefile cluster.bigblueswarm