Skip to content

Commit

Permalink
Merge pull request #545 from andyzhangx/blobfuse-build-fix
Browse files Browse the repository at this point in the history
chore: fix blobfuse build in pipeline
  • Loading branch information
andyzhangx authored Oct 14, 2021
2 parents bf5ab81 + e683834 commit c05783c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@ cscope.*
profile.cov

pkg/blobfuse-proxy/debpackage/usr/
deploy/blobfuse-proxy/blobfuse-proxy.deb
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ e2e-teardown:
helm delete blob-csi-driver --namespace kube-system

.PHONY: blob
blob:
blob: blobfuse-proxy
CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) go build -a -ldflags ${LDFLAGS} -mod vendor -o _output/blobplugin ./pkg/blobplugin

.PHONY: blob-windows
Expand All @@ -104,7 +104,7 @@ blob-darwin:
CGO_ENABLED=0 GOOS=darwin go build -a -ldflags ${LDFLAGS} -mod vendor -o _output/blobplugin ./pkg/blobplugin

.PHONY: container
container: blob blobfuse-proxy
container: blob
docker build -t $(IMAGE_TAG) --output=type=docker -f ./pkg/blobplugin/Dockerfile .

.PHONY: container-linux
Expand All @@ -113,7 +113,7 @@ container-linux:
-t $(IMAGE_TAG)-linux-$(ARCH) --build-arg ARCH=$(ARCH) -f ./pkg/blobplugin/Dockerfile .

.PHONY: blob-container
blob-container: blobfuse-proxy
blob-container:
docker buildx rm container-builder || true
docker buildx create --use --name=container-builder

Expand Down Expand Up @@ -170,7 +170,3 @@ blobfuse-proxy:
mkdir -p ./pkg/blobfuse-proxy/debpackage/usr/bin/
CGO_ENABLED=0 GOOS=linux go build -mod vendor -ldflags="-s -w" -o ./pkg/blobfuse-proxy/debpackage/usr/bin/blobfuse-proxy ./pkg/blobfuse-proxy
dpkg-deb --build pkg/blobfuse-proxy/debpackage deploy/blobfuse-proxy/blobfuse-proxy.deb

.PHONY: blobfuse-proxy-container
blobfuse-proxy-container:
sudo docker build -t blobfuse-proxy -f pkg/blobfuse-proxy/Dockerfile .

0 comments on commit c05783c

Please sign in to comment.