This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
49 lines (38 loc) · 1.58 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
THIS_FILE := $(lastword $(MAKEFILE_LIST))
build:
go build .
running := "$(shell docker inspect -f '{{.State.Running}}' "kind-registry" 2>/dev/null || true)"
image-local-registry: SHELL:=/bin/bash
image-local-registry:
[ $(running) != "true" ] && docker run \
--ip 172.17.0.2 -d --restart=always -p "5000:5000" --name "kind-registry" \
registry:2 || true
docker build --no-cache -t cfpersi/smb-plugin .
docker tag cfpersi/smb-plugin localhost:5000/cfpersi/smb-plugin:local-test
docker push localhost:5000/cfpersi/smb-plugin:local-test
start-docker:
start-docker &
echo 'until docker info; do sleep 5; done' >/usr/local/bin/wait_for_docker
chmod +x /usr/local/bin/wait_for_docker
timeout 300 wait_for_docker
kill-docker:
pkill dockerd
test:
go get github.com/onsi/ginkgo/ginkgo
cd identityserver && ~/go/bin/ginkgo -race .
cd nodeserver && ~/go/bin/ginkgo -race .
e2e: SHELL:=/bin/bash
e2e:
@$(MAKE) -f $(THIS_FILE) image-local-registry
go get github.com/onsi/ginkgo/ginkgo
~/go/bin/ginkgo -r -focus "CSI Volumes"
fly:
fly -t persi execute -p -c ~/workspace/smb-volume-k8s-release/smb-csi-driver/ci/unit-and-sanity-tests.yml -i smb-volume-k8s-release=$$HOME/workspace/smb-volume-k8s-release
fly-e2e:
fly -t persi execute -p -c ~/workspace/smb-volume-k8s-release/smb-csi-driver/ci/e2e-tests.yml -i smb-volume-k8s-release=$$HOME/workspace/smb-volume-k8s-release
kustomize:
@$(MAKE) -f $(THIS_FILE) kustomize-delete || true
kubectl apply --kustomize ./overlays/deploy
kustomize-delete:
kubectl delete --kustomize ./overlays/deploy
.PHONY: test fly fly-e2e image-local-registry