Skip to content

Commit 51d29ba

Browse files
akhilermKiran Mova
authored andcommitted
fix(build): fix release tag env in buildscript
RELEASE_TAG and BRANCH is now passed as a build argument to the buildx container, so that build script can set the ldflags correctly. Signed-off-by: Akhil Mohan <[email protected]>
1 parent 969fa02 commit 51d29ba

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ ifeq (${DBUILD_SITE_URL}, )
8686
export DBUILD_SITE_URL
8787
endif
8888

89-
export DBUILD_ARGS=--build-arg DBUILD_DATE=${DBUILD_DATE} --build-arg DBUILD_REPO_URL=${DBUILD_REPO_URL} --build-arg DBUILD_SITE_URL=${DBUILD_SITE_URL}
89+
export DBUILD_ARGS=--build-arg DBUILD_DATE=${DBUILD_DATE} --build-arg DBUILD_REPO_URL=${DBUILD_REPO_URL} --build-arg DBUILD_SITE_URL=${DBUILD_SITE_URL} --build-arg BRANCH=${BRANCH} --build-arg RELEASE_TAG=${RELEASE_TAG}
9090

9191
.PHONY: all
9292
all: test provisioner-localpv-image

buildscripts/provisioner-localpv/provisioner-localpv.Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#
1515
FROM golang:1.14.7 as build
1616

17+
ARG BRANCH
18+
ARG RELEASE_TAG
1719
ARG TARGETOS
1820
ARG TARGETARCH
1921
ARG TARGETVARIANT=""
@@ -24,7 +26,9 @@ ENV GO111MODULE=on \
2426
GOARCH=${TARGETARCH} \
2527
GOARM=${TARGETVARIANT} \
2628
DEBIAN_FRONTEND=noninteractive \
27-
PATH="/root/go/bin:${PATH}"
29+
PATH="/root/go/bin:${PATH}" \
30+
BRANCH=${BRANCH} \
31+
RELEASE_TAG=${RELEASE_TAG}
2832

2933
WORKDIR /go/src/github.com/openebs/dynamic-localpv-provisioner/
3034

0 commit comments

Comments
 (0)