forked from CrunchyData/pgo-osb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.docker
57 lines (45 loc) · 1.67 KB
/
Makefile.docker
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
PULL ?= IfNotPresent
build: ## Builds the starter pack
go build -i github.com/crunchydata/pgo-osb/cmd/pgo-osb
test: ## Runs the tests
go test -v $(shell go list ./... | grep -v /vendor/ | grep -v /test/)
linux: ## Builds a Linux executable
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
go build -o pgo-osb --ldflags="-s" github.com/crunchydata/pgo-osb/cmd/pgo-osb
main:
go install pgo-osb.go
image: main
cp $(GOBIN)/pgo-osb .
docker build -t pgo-osb -f $(OSB_BASEOS)/Dockerfile.pgo-osb.$(OSB_BASEOS) .
docker tag pgo-osb $(OSB_IMAGE_PREFIX)/pgo-osb:$(OSB_IMAGE_TAG)
push:
docker push $(OSB_IMAGE_PREFIX)/pgo-osb:$(OSB_IMAGE_TAG)
deploy:
cd deploy && ./deploy.sh
clean: ## Cleans up build artifacts
rm -f pgo-osb
rm -f pgo-osb-linux
rm -f image/pgo-osb
provision: ## Provisions a service instance
expenv -f manifests/service-instance.yaml | kubectl create -f -
deprovision:
kubectl delete serviceinstance testinstance
provision2: ## Provisions a service instance
expenv -f manifests/service-instance2.yaml | kubectl create -f -
deprovision2:
kubectl delete serviceinstance testinstance2
setup:
go get github.com/blang/expenv
bind: ## Creates a binding
expenv -f manifests/service-binding.yaml | kubectl create -f -
bind2: ## Creates a binding
expenv -f manifests/service-binding2.yaml | kubectl create -f -
help: ## Shows the help
@echo 'Usage: make <OPTIONS> ... <TARGETS>'
@echo ''
@echo 'Available targets are:'
@echo ''
@grep -E '^[ a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
@echo ''
.PHONY: deploy build test linux image clean push deploy-helm deploy-openshift create-ns provision bind help