Skip to content

Commit 7848dce

Browse files
authored
Merge pull request #252 from alexander-ding/enh/migrate-v2
Remove v1 client and pkg code
2 parents a6fc199 + 3db4149 commit 7848dce

File tree

986 files changed

+8
-464388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

986 files changed

+8
-464388
lines changed

.github/workflows/windows.yml

-10
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,8 @@ jobs:
1414
go-version: ${{ matrix.go-version }}
1515
- name: Checkout code
1616
uses: actions/checkout@v2
17-
- name: Build
18-
run: |
19-
go build -v -a -o ./bin/csi-proxy.exe ./cmd/csi-proxy
2017
- name: Run Windows Integration Tests
2118
run: |
22-
# start the CSI Proxy before running tests on windows
23-
Start-Job -Name CSIProxy -ScriptBlock {
24-
.\bin\csi-proxy.exe
25-
};
26-
Start-Sleep -Seconds 30;
27-
Write-Output "getting named pipes"
28-
[System.IO.Directory]::GetFiles("\\.\\pipe\\")
2919
$env:CSI_PROXY_GH_ACTIONS="TRUE"
3020
go test -v -race ./integrationtests/...
3121
unit_tests:

Makefile

+4-44
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
CMDS=csi-proxy
2-
all: build test
1+
all: test
32

43
# include release tools for building binary and testing targets
54
include release-tools/build.make
@@ -10,42 +9,6 @@ REPO_ROOT = $(CURDIR)
109
BUILD_DIR = bin
1110
BUILD_TOOLS_DIR = $(BUILD_DIR)/tools
1211
GO_ENV_VARS = GO111MODULE=on GOOS=windows
13-
CSI_PROXY_API_GEN = $(BUILD_DIR)/csi-proxy-api-gen
14-
15-
.PHONY: compile-csi-proxy-api-gen
16-
compile-csi-proxy-api-gen:
17-
GO111MODULE=on go build -o $(CSI_PROXY_API_GEN) ./cmd/csi-proxy-api-gen
18-
19-
.PHONY: generate
20-
generate: generate-protobuf generate-csi-proxy-api-gen
21-
22-
# using xargs instead of -exec since the latter doesn't propagate exit statuses
23-
.PHONY: generate-protobuf
24-
generate-protobuf:
25-
@ if ! which protoc > /dev/null 2>&1; then echo 'Unable to find protoc binary' ; exit 1; fi
26-
@ generate_protobuf_for() { \
27-
local FILE="$$1"; \
28-
local FILE_DIR="$$(dirname "$(GOPATH)/$$FILE")"; \
29-
echo "Generating protobuf file from $$FILE in $$FILE_DIR"; \
30-
protoc -I "$(GOPATH)/src/" -I '$(REPO_ROOT)/client/api' "$$FILE" --go_out=plugins="grpc:$(GOPATH)/src"; \
31-
} ; \
32-
export -f generate_protobuf_for; \
33-
find '$(REPO_ROOT)' -not -path './vendor/*' -name '*.proto' | sed -e "s|$(GOPATH)/src/||g" | xargs -n1 '$(SHELL)' -c 'generate_protobuf_for "$$0"'
34-
35-
.PHONY: generate-csi-proxy-api-gen
36-
generate-csi-proxy-api-gen: compile-csi-proxy-api-gen
37-
$(CSI_PROXY_API_GEN) -i github.com/kubernetes-csi/csi-proxy/client/api,github.com/kubernetes-csi/csi-proxy/integrationtests/apigroups/api/dummy --v=8
38-
39-
.PHONY: clean
40-
clean: clean-protobuf clean-generated
41-
42-
.PHONY: clean-protobuf
43-
clean-protobuf:
44-
find '$(REPO_ROOT)' -name '*.proto' -exec '$(SHELL)' -c 'rm -vf "$$(dirname {})/$$(basename {} .proto).pb.go"' \;
45-
46-
.PHONY: clean-generated
47-
clean-generated:
48-
find '$(REPO_ROOT)' -name '*_generated.go' -exec '$(SHELL)' -c '[[ "$$(head -n 1 "{}")" == "// Code generated by csi-proxy-api-gen"* ]] && rm -v {}' \;
4912

5013
# see https://github.com/golangci/golangci-lint/releases
5114
GOLANGCI_LINT_VERSION = v1.21.0
@@ -60,17 +23,14 @@ lint: $(GOLANGCI_LINT)
6023
test: test-go
6124
test-go:
6225
@ echo; echo "### $@:"
63-
# TODO: After issue https://github.com/microsoft/go-winio/pull/169 is resolved, remove the filter on the test path.
64-
GO111MODULE=on go test `find ./internal/server/ -type d -not -name server`;\
65-
cd client && GO111MODULE=on go test `go list ./... | grep -v group` && cd ../
26+
@ echo "No need to run test. Testing is done in GitHub Actions and custom Prow job."
6627

6728
.PHONY: test-vet
6829
test: test-vet
6930
test-vet:
7031
@ echo; echo "### $@:"
71-
# TODO: After issue https://github.com/microsoft/go-winio/pull/169 is resolved, remove the filter on the test path.
72-
# GO111MODULE=on go vet `find ./internal/server/ -type d -not -name server`;\
73-
cd client && GO111MODULE=on go vet `go list ./... | grep -v group` && cd ../
32+
@ echo "No need to run vet. Testing is done in GitHub Actions and custom Prow job."
33+
7434
# see https://github.com/golangci/golangci-lint#binary-release
7535
$(GOLANGCI_LINT):
7636
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$$(dirname '$(GOLANGCI_LINT)')" '$(GOLANGCI_LINT_VERSION)'

client/LICENSE

-202
This file was deleted.

client/README.md

-5
This file was deleted.

0 commit comments

Comments
 (0)