File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11
22LINT_VERSION ="1.40.0"
33
4- IMAGE_REPO ="quay.io"
5- NAME_SPACE ="ibmodffs"
6- DRIVER_IMAGE_VERSION =1.4.0
7-
4+ REGISTRY =quay.io/ibmodffs
5+ IMAGE_TAG =1.4.0
6+ PLATFORM =linux/amd64,linux/ppc64le,linux/s390x
87DRIVER_NAME =ibm-storage-odf-block-driver
98
10- DRIVER_IMAGE =$(IMAGE_REPO ) /${NAME_SPACE}/$(DRIVER_NAME )
9+ DRIVER_IMAGE =$(REGISTRY ) /$(DRIVER_NAME ) :$(IMAGE_TAG )
10+ BUILD_COMMAND = docker buildx build -t $(DRIVER_IMAGE ) --platform $(PLATFORM ) -f ./Dockerfile .
11+
1112
12- .PHONY : all $(DRIVER_IMAGE )
13+ .PHONY : all $(DRIVER_NAME )
1314
14- all : $(DRIVER_IMAGE )
15+ all : $(DRIVER_NAME )
1516
16- $(DRIVER_IMAGE ) :
17+ $(DRIVER_NAME ) :
1718 if [ ! -d ./vendor ]; then dep ensure -v; fi
1819 CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags ' -extldflags "-static"' -o ./build/_output/bin/${DRIVER_NAME} ./cmd/manager/main.go
1920
@@ -28,7 +29,7 @@ lint: deps
2829 golangci-lint run -E gosec --timeout=6m # Run `make lint-fix` may help to fix lint issues.
2930
3031.PHONY : lint-fix
31- lint-fix : deps
32+ lint-fix : deps
3233 golangci-lint run --fix
3334
3435.PHONY : build
@@ -38,12 +39,12 @@ build:
3839.PHONY : test
3940test :
4041 go test -race -covermode=atomic -coverprofile=cover.out ./pkg/...
41-
42- build-image :
43- docker build -t $(DRIVER_IMAGE ) :$(DRIVER_IMAGE_VERSION ) -f ./Dockerfile .
4442
45- push-image : build-image
46- docker push $(DRIVER_IMAGE ) :$(DRIVER_IMAGE_VERSION )
43+ build-image :
44+ $(BUILD_COMMAND )
45+
46+ push-image :
47+ $(BUILD_COMMAND ) --push
4748
4849clean : bin-clean
4950
@@ -54,4 +55,4 @@ add-copyright:
5455 hack/add-copyright.sh
5556
5657check-copyright :
57- hack/check-copyright.sh
58+ hack/check-copyright.sh
You can’t perform that action at this time.
0 commit comments