-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (26 loc) · 852 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
33
34
35
36
.PHONY : build clean dist fresh run_backup run_restore test docker_build docker_run_backup
BIN := pmm_grafana_backup_tool
GRAFANA_TOKEN ?=
GRAFANA_URL ?=
build:
go build -o ${BIN} -ldflags="-s -w"
clean:
go clean
- rm -f ${BIN}
dist:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(MAKE) build
fresh: clean build run
run_backup:
./${BIN} backup
run_restore:
./${BIN} restore
test:
go test
docker_build:
docker build . -t aemdeveloper/pmm_grafana_backup_tool_test:0.0.1
docker_run_backup:
docker run --rm --name pmm_grafana_backup_tool \
-e GRAFANA_TOKEN=${GRAFANA_TOKEN} \
-e GRAFANA_URL=${GRAFANA_URL} \
-v /Users/dmytro.liakhov/dev/percona/pmm_grafana_backup/pmm_grafana_backup_tool/dashboards_docker:/opt/pmm_grafana_backup_tool/_OUTPUT_ \
$(docker build -q .)