-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
64 lines (57 loc) · 2.11 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
.PHONY: all run start stop deps test build
all: build
run:
@docker run --rm -it -v "${GOPATH}":/go \
-v "${HOME}/.aws":/root/.aws \
-w /go/src/github.com/pottava/ecs-task-runner \
-e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY \
-e AWS_MFA_SERIAL_NUMBER -e AWS_MFA_TOKEN \
-e AWS_PROFILE -e AWS_ASSUME_ROLE \
-e AWS_DEFAULT_REGION=us-west-2 \
-e APP_DEBUG=0 \
golang:1.17.5-alpine3.15 \
go run cmd/ecs-task-runner/main.go \
run alpine --entrypoint env --extended-output
start:
@docker run --rm -it -v "${GOPATH}":/go \
-v "${HOME}/.aws":/root/.aws \
-w /go/src/github.com/pottava/ecs-task-runner \
-e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY \
-e AWS_MFA_SERIAL_NUMBER -e AWS_MFA_TOKEN \
-e AWS_PROFILE -e AWS_ASSUME_ROLE \
-e AWS_DEFAULT_REGION=us-west-2 \
-e APP_DEBUG=0 \
golang:1.17.5-alpine3.15 \
go run cmd/ecs-task-runner/main.go \
run dockercloud/hello-world \
--async -p 80 --security-groups "${SECURITY_GROUP_ID}" --spot
stop:
@docker run --rm -it -v "${GOPATH}":/go \
-v "${HOME}/.aws":/root/.aws \
-w /go/src/github.com/pottava/ecs-task-runner \
-e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY \
-e AWS_MFA_SERIAL_NUMBER -e AWS_MFA_TOKEN \
-e AWS_PROFILE -e AWS_ASSUME_ROLE \
-e AWS_DEFAULT_REGION=us-west-2 \
-e APP_DEBUG=0 \
golang:1.17.5-alpine3.15 \
go run cmd/ecs-task-runner/main.go \
stop "${REQUEST_ID}"
deps:
@docker run --rm -it -v "${GOPATH}":/go \
-w /go/src/github.com/pottava/ecs-task-runner \
golang:1.17.5-alpine3.15 go mod vendor
test:
@docker run --rm -it -v "${GOPATH}":/go \
-w /go/src/github.com/pottava/ecs-task-runner \
supinf/golangci-lint:1.19 \
run --config .golangci.yml
@docker run --rm -it -v "${GOPATH}":/go \
-w /go/src/github.com/pottava/ecs-task-runner \
--entrypoint go golang:1.17.5-alpine3.15 \
test -vet off $(go list ./...) -mod=readonly
build:
@docker run --rm -it -v "${GOPATH}":/go \
-w /go/src/github.com/pottava/ecs-task-runner/cmd/ecs-task-runner \
supinf/go-gox:1.11 --osarch "linux/amd64 darwin/amd64 windows/amd64" \
-ldflags "-s -w" -output "dist/{{.OS}}_{{.Arch}}"