From 5849acc4cfdab4a95120e86346b86f7798ed8e79 Mon Sep 17 00:00:00 2001 From: shubham Date: Thu, 12 Nov 2020 18:43:44 +0530 Subject: [PATCH] fix(build): propagate RELEASE_TAG to buildx container Signed-off-by: shubham --- Makefile.buildx.mk | 2 +- buildscripts/admission-server/admission-server.Dockerfile | 6 +++++- buildscripts/apiserver/apiserver.Dockerfile | 6 +++++- buildscripts/cstor-pool-mgmt/cstor-pool-mgmt.Dockerfile | 6 +++++- .../cstor-volume-mgmt/cstor-volume-mgmt.Dockerfile | 6 +++++- buildscripts/upgrade/upgrade.Dockerfile | 7 +++++-- 6 files changed, 26 insertions(+), 7 deletions(-) diff --git a/Makefile.buildx.mk b/Makefile.buildx.mk index d3fffe91d0..7c89145c66 100644 --- a/Makefile.buildx.mk +++ b/Makefile.buildx.mk @@ -19,7 +19,7 @@ # ============================================================================== # Build Options -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} +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 RELEASE_TAG=${RELEASE_TAG} --build-arg BRANCH=${BRANCH} ifeq (${TAG}, ) export TAG=ci diff --git a/buildscripts/admission-server/admission-server.Dockerfile b/buildscripts/admission-server/admission-server.Dockerfile index e74d0f25b9..f75391e63e 100644 --- a/buildscripts/admission-server/admission-server.Dockerfile +++ b/buildscripts/admission-server/admission-server.Dockerfile @@ -13,6 +13,8 @@ # limitations under the License. FROM golang:1.14.7 as build +ARG RELEASE_TAG +ARG BRANCH ARG TARGETOS ARG TARGETARCH ARG TARGETVARIANT="" @@ -22,7 +24,9 @@ ENV GO111MODULE=on \ GOARCH=${TARGETARCH} \ GOARM=${TARGETVARIANT} \ DEBIAN_FRONTEND=noninteractive \ - PATH="/root/go/bin:${PATH}" + PATH="/root/go/bin:${PATH}" \ + RELEASE_TAG=${RELEASE_TAG} \ + BRANCH=${BRANCH} WORKDIR /go/src/github.com/openebs/maya/ diff --git a/buildscripts/apiserver/apiserver.Dockerfile b/buildscripts/apiserver/apiserver.Dockerfile index 7b194f6b5c..90545879b2 100644 --- a/buildscripts/apiserver/apiserver.Dockerfile +++ b/buildscripts/apiserver/apiserver.Dockerfile @@ -13,6 +13,8 @@ # limitations under the License. FROM golang:1.14.7 as build +ARG RELEASE_TAG +ARG BRANCH ARG TARGETOS ARG TARGETARCH ARG TARGETVARIANT="" @@ -22,7 +24,9 @@ ENV GO111MODULE=on \ GOARCH=${TARGETARCH} \ GOARM=${TARGETVARIANT} \ DEBIAN_FRONTEND=noninteractive \ - PATH="/root/go/bin:${PATH}" + PATH="/root/go/bin:${PATH}" \ + RELEASE_TAG=${RELEASE_TAG} \ + BRANCH=${BRANCH} WORKDIR /go/src/github.com/openebs/maya/ diff --git a/buildscripts/cstor-pool-mgmt/cstor-pool-mgmt.Dockerfile b/buildscripts/cstor-pool-mgmt/cstor-pool-mgmt.Dockerfile index de96cc8c33..2e4cf7aa3c 100644 --- a/buildscripts/cstor-pool-mgmt/cstor-pool-mgmt.Dockerfile +++ b/buildscripts/cstor-pool-mgmt/cstor-pool-mgmt.Dockerfile @@ -14,6 +14,8 @@ ARG BASE_IMAGE FROM golang:1.14.7 as build +ARG RELEASE_TAG +ARG BRANCH ARG TARGETOS ARG TARGETARCH ARG TARGETVARIANT="" @@ -23,7 +25,9 @@ ENV GO111MODULE=on \ GOARCH=${TARGETARCH} \ GOARM=${TARGETVARIANT} \ DEBIAN_FRONTEND=noninteractive \ - PATH="/root/go/bin:${PATH}" + PATH="/root/go/bin:${PATH}" \ + RELEASE_TAG=${RELEASE_TAG} \ + BRANCH=${BRANCH} WORKDIR /go/src/github.com/openebs/maya/ diff --git a/buildscripts/cstor-volume-mgmt/cstor-volume-mgmt.Dockerfile b/buildscripts/cstor-volume-mgmt/cstor-volume-mgmt.Dockerfile index b0867641d0..40605be1be 100644 --- a/buildscripts/cstor-volume-mgmt/cstor-volume-mgmt.Dockerfile +++ b/buildscripts/cstor-volume-mgmt/cstor-volume-mgmt.Dockerfile @@ -14,6 +14,8 @@ ARG BASE_IMAGE FROM golang:1.14.7 as build +ARG RELEASE_TAG +ARG BRANCH ARG TARGETOS ARG TARGETARCH ARG TARGETVARIANT="" @@ -23,7 +25,9 @@ ENV GO111MODULE=on \ GOARCH=${TARGETARCH} \ GOARM=${TARGETVARIANT} \ DEBIAN_FRONTEND=noninteractive \ - PATH="/root/go/bin:${PATH}" + PATH="/root/go/bin:${PATH}" \ + RELEASE_TAG=${RELEASE_TAG} \ + BRANCH=${BRANCH} WORKDIR /go/src/github.com/openebs/maya/ diff --git a/buildscripts/upgrade/upgrade.Dockerfile b/buildscripts/upgrade/upgrade.Dockerfile index dc9fd8e087..9e29146f51 100644 --- a/buildscripts/upgrade/upgrade.Dockerfile +++ b/buildscripts/upgrade/upgrade.Dockerfile @@ -11,9 +11,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -ARG BASE_IMAGE FROM golang:1.14.7 as build +ARG RELEASE_TAG +ARG BRANCH ARG TARGETOS ARG TARGETARCH ARG TARGETVARIANT="" @@ -23,7 +24,9 @@ ENV GO111MODULE=on \ GOARCH=${TARGETARCH} \ GOARM=${TARGETVARIANT} \ DEBIAN_FRONTEND=noninteractive \ - PATH="/root/go/bin:${PATH}" + PATH="/root/go/bin:${PATH}" \ + RELEASE_TAG=${RELEASE_TAG} \ + BRANCH=${BRANCH} WORKDIR /go/src/github.com/openebs/maya/