-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
executable file
·41 lines (32 loc) · 1.5 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
VERSION ?= $(shell cat ./VERSION)
GITHASH ?= $(shell git describe --match nEvErMatch --always --abbrev=10 --dirty)
NAME=bin/hs-csi-plugin
compile:
@echo "==> Building the Hammerspace CSI Driver Version ${VERSION}"
@env GO111MODULE=on go get -d ./
@env GO111MODULE=on GO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X 'github.com/hammer-space/csi-plugin/pkg/common.Version=${VERSION}' -X 'github.com/hammer-space/csi-plugin/pkg/common.Githash=${GITHASH}'" -o ${NAME} ./
clean:
@echo "==> Cleaning"
@env go clean
rm -rf bin go.sum
unittest:
@echo "==> Running tests"
@env go test -v -count 1 -run="[^TestSanity]" ./...
sanity:
@echo "==> Running sanity functional tests"
@env go test -timeout=0 -v -run="TestSanity" ./...
build-dev:
@echo "==> Building Docker Image for Dev Image"
@docker build -t "hammerspaceinc/csi-plugin-dev:latest" . -f Dockerfile_dev --no-cache
build:
@echo "==> Building Docker Image Latest"
@docker build -t "hammerspaceinc/csi-plugin:latest" . -f Dockerfile --no-cache
build-release:
@echo "==> Building Docker Image ${VERSION} ${GITHASH}"
@docker build --build-arg version=${VERSION} -t "hammerspaceinc/csi-plugin:${VERSION}" . -f Dockerfile
build-alpine:
@echo "==> Building Alpine Docker Image Latest"
@docker build -t "hammerspaceinc/csi-plugin" . -f Dockerfile_alpine --no-cache
build-alpine-release:
@echo "==> Building Docker Image ${VERSION} ${GITHASH}"
@docker build --build-arg version=${VERSION} -t "hammerspaceinc/csi-plugin:${VERSION}" . -f Dockerfile_alpine