forked from IBM/portieris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
76 lines (54 loc) · 3.08 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
65
66
67
68
69
70
71
72
73
74
GOFILES=$(shell find . -type f -name '*.go' -not -path "./vendor/*")
GOPACKAGES=$(shell go list ./... | grep -v /vendor/ | grep -v test/ | grep -v pkg/apis/)
dep:
@go get -u github.com/golang/dep/cmd/dep
build-deps: dep
@dep ensure -v -vendor-only
test-deps: build-deps
@go get github.com/stretchr/testify/assert
@go get github.com/golang/lint/golint
@go get github.com/pierrre/gotestcover
@go get github.com/onsi/ginkgo/ginkgo
@go get github.com/onsi/gomega/...
test: test-deps
$(GOPATH)/bin/gotestcover -v -coverprofile=cover.out ${GOPACKAGES}
copyright:
@${GOPATH}/src/github.com/IBM/portieris/scripts/copyright.sh
copyright-check:
@${GOPATH}/src/github.com/IBM/portieris/scripts/copyright-check.sh
fmt:
@if [ -n "$$(gofmt -l ${GOFILES})" ]; then echo 'Please run gofmt -l -w on your code.' && exit 1; fi
lint:
@set -e; for LINE in ${GOPACKAGES}; do golint -set_exit_status=true $${LINE} ; done
vet:
@set -e; for LINE in ${GOPACKAGES}; do go vet $${LINE} ; done
helm.install:
-rm $$(pwd)/portieris-0.2.0.tgz
helm package helm/portieris
helm install -n portieris $$(pwd)/portieris-0.2.0.tgz
helm.clean:
-helm/cleanup.sh portieris
e2e:
-helm package install/helm/portieris
@go test -v ./test/e2e --kubeconfig $$HOME/.kube/config --helmChart $$(pwd)/portieris-0.2.0.tgz
e2e.quick: e2e.quick.trust.imagepolicy e2e.quick.trust.clusterimagepolicy e2e.quick.armada e2e.quick.wildcards e2e.quick.generic
- kubectl delete namespace $$(kubectl get namespaces | grep -v ibm | grep -v kube | grep -v default | awk '{ print $$1 }' | grep -v NAME)
e2e.quick.trust.imagepolicy:
@go test -v ./test/e2e --no-install --trust-image-policy --kubeconfig $$HOME/.kube/config --helmChart $$(pwd)/portieris-0.2.0.tgz
-kubectl delete namespace $$(kubectl get namespaces | grep -v ibm | grep -v kube | grep -v default | awk '{ print $$1 }' | grep -v NAME)
e2e.quick.trust.clusterimagepolicy:
@go test -v ./test/e2e --no-install --trust-cluster-image-policy --kubeconfig $$HOME/.kube/config --helmChart $$(pwd)/portieris-0.2.0.tgz
-kubectl delete namespace $$(kubectl get namespaces | grep -v ibm | grep -v kube | grep -v default | awk '{ print $$1 }' | grep -v NAME)
e2e.quick.wildcards:
@go test -v ./test/e2e --no-install --wildcards-image-policy --kubeconfig $$HOME/.kube/config --helmChart $$(pwd)/portieris-0.2.0.tgz
-kubectl delete namespace $$(kubectl get namespaces | grep -v ibm | grep -v kube | grep -v default | awk '{ print $$1 }' | grep -v NAME)
e2e.quick.armada:
@go test -v ./test/e2e --no-install --armada --kubeconfig $$HOME/.kube/config --helmChart $$(pwd)/portieris-0.2.0.tgz
-kubectl delete namespace $$(kubectl get namespaces | grep -v ibm | grep -v kube | grep -v default | awk '{ print $$1 }' | grep -v NAME)
e2e.quick.generic:
@go test -v ./test/e2e --no-install --generic --kubeconfig $$HOME/.kube/config --helmChart $$(pwd)/portieris-0.2.0.tgz
-kubectl delete namespace $$(kubectl get namespaces | grep -v ibm | grep -v kube | grep -v default | awk '{ print $$1 }' | grep -v NAME)
e2e.helm:
kubectl apply -f test/helm/tiller-rbac.yaml
helm init --service-account tiller
e2e.clean: helm.clean