File tree Expand file tree Collapse file tree 6 files changed +29
-58
lines changed Expand file tree Collapse file tree 6 files changed +29
-58
lines changed Original file line number Diff line number Diff line change 1
1
2
2
# ignore files specific to csi-test
3
- bin /mock
3
+ bin /mock-driver
4
4
cmd /csi-sanity /csi-sanity
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ release-tools/travis.yml
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- IMAGE_NAME = quay.io/k8scsi/mock-driver
16
- IMAGE_VERSION = canary
17
- APP := ./bin/mock
18
-
19
-
20
- ifdef V
21
- TESTARGS = -v -args -alsologtostderr -v 5
22
- else
23
- TESTARGS =
24
- endif
25
-
26
- all : $(APP )
27
-
28
- $(APP ) :
29
- mkdir -p bin
30
- CGO_ENABLED=0 GOOS=linux go build -a -ldflags ' -extldflags "-static"' -o $(APP ) ./mock/main.go
31
-
32
- clean :
33
- rm -rf bin
34
-
35
- container : $(APP )
36
- docker build -f Dockerfile.mock -t $(IMAGE_NAME ) :$(IMAGE_VERSION ) .
37
-
38
- push : container
39
- docker push $(IMAGE_NAME ) :$(IMAGE_VERSION )
40
-
41
- test : $(APP )
42
- files=$$(find ./ -name '*.go' | grep -v '^./vendor' ) ; \
43
- if [ $$(gofmt -d $$files | wc -l) -ne 0 ]; then \
44
- echo "formatting errors :"; \
45
- gofmt -d $$files; \
46
- false; \
47
- fi
48
- go vet $$(go list ./... | grep -v vendor)
49
- go test $$(go list ./... | grep -v vendor | grep -v "cmd/csi-sanity")
15
+ # This repository builds two commands, mock-driver and csi-sanity,
16
+ # but csi-sanity has its own build rules and only mock-driver gets
17
+ # published as a container image.
18
+ CMDS =mock-driver
19
+ all : build build-sanity
20
+
21
+ include release-tools/build.make
22
+
23
+ # We have to exclude generic testing of the csi-sanity command because
24
+ # the test binary only works in combination with a CSI driver.
25
+ # Instead we test with the special ./hack/e2e.sh.
26
+ TEST_GO_FILTER_CMD+ =| grep -v /cmd/csi-sanity
27
+ .PHONY : test-sanity
28
+ test : test-sanity
29
+ test-sanity :
30
+ @ echo ; echo " ### test-sanity"
50
31
./hack/e2e.sh
51
32
52
- .PHONY : all clean container push test
33
+ build-sanity :
34
+ $(MAKE ) -C cmd/csi-sanity all
Original file line number Diff line number Diff line change
1
+ FROM alpine
2
+ LABEL maintainers="Kubernetes Authors"
3
+ LABEL description="CSI Mock Driver"
4
+
5
+ # For historic reasons the binary is called "mock" inside the container.
6
+ # It's kept that way because some .yaml file might use that name instead
7
+ # of relying on the entry point.
8
+ COPY ./bin/mock-driver mock
9
+ ENTRYPOINT ["/mock" ]
File renamed without changes.
You can’t perform that action at this time.
0 commit comments