forked from aws-samples/amazon-ecr-continuous-scan
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
32 lines (21 loc) · 1.22 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
ECR_SCAN_STACK_NAME?=ecr-continuous-scan
ECR_SCAN_SVC_BUCKET?=ecr-continuous-scan-svc-eslamtest3
ECR_SCAN_CONFIG_BUCKET?=ecr-continuous-scan-config-eslamtest3
.PHONY: build up deploy destroy status
build: bconfigs bsscan bsummary bfindings
bconfigs:
GOOS=linux GOARCH=amd64 go build -v -ldflags '-d -s -w' -a -tags netgo -installsuffix netgo -o bin/configs ./configs
bsscan:
GOOS=linux GOARCH=amd64 go build -v -ldflags '-d -s -w' -a -tags netgo -installsuffix netgo -o bin/start-scan ./start-scan
bsummary:
GOOS=linux GOARCH=amd64 go build -v -ldflags '-d -s -w' -a -tags netgo -installsuffix netgo -o bin/summary ./summary
bfindings:
GOOS=linux GOARCH=amd64 go build -v -ldflags '-d -s -w' -a -tags netgo -installsuffix netgo -o bin/findings ./findings
up:
sam package --template-file template.yaml --output-template-file current-stack.yaml --s3-bucket ${ECR_SCAN_SVC_BUCKET}
sam deploy --template-file current-stack.yaml --stack-name ${ECR_SCAN_STACK_NAME} --capabilities CAPABILITY_IAM --parameter-overrides ConfigBucketName="${ECR_SCAN_CONFIG_BUCKET}"
deploy: build up
destroy:
aws cloudformation delete-stack --stack-name ${ECR_SCAN_STACK_NAME}
status:
aws cloudformation describe-stacks --stack-name ${ECR_SCAN_STACK_NAME}