-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (26 loc) · 1.25 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
.PHONY: help
default: help
help: ## Show this help
@echo "rawk8stfc"
@echo "======================"
@echo
@echo "A cli tool to create tf resources for all k8s objects inputed"
@echo
@fgrep -h " ## " $(MAKEFILE_LIST) | fgrep -v fgrep | sed -Ee 's/([a-z.]*):[^#]*##(.*)/\1##\2/' | column -t -s "##"
build: ## build the binary
go build -o rawk8stfc main.go
build-test-image: ## build the docker test image
docker build -f Dockerfile.test . -t integration-tests
integration-tests: build-test-image ## validate golden files work with terraform-provider-k8s
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock integration-tests
shell: build-test-image ## run the integration-tests container and interact with it
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock --entrypoint bash integration-tests
coverage: ## show test coverage in browser
go test -coverprofile=cover.out ./... && go tool cover -html=cover.out
goreleaser: ## create a release using goreleaser
docker run -it --rm --privileged \
-v $(PWD):/go/src/github.com/sebradloff/raw-k8s-tf-compiler \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /go/src/github.com/sebradloff/raw-k8s-tf-compiler \
-e GITHUB_TOKEN \
goreleaser/goreleaser:v0.132.1 release --rm-dist