From e7666e42c0cffae30e64b833d3eceee6caef43a4 Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Wed, 21 Dec 2022 19:46:37 +0100 Subject: [PATCH] Allow override of build git env in docker/base builds (#11968) * Pass BUILD_GIT_BRANCH and BUILD_GIT_REV env into docker build Signed-off-by: Tim Vaillancourt * Fix bootstrap version Signed-off-by: Tim Vaillancourt * Fix bootstrap version, again Signed-off-by: Tim Vaillancourt * Fix ws Signed-off-by: Tim Vaillancourt Signed-off-by: Tim Vaillancourt Signed-off-by: Florent Poinsard Co-authored-by: Florent Poinsard --- docker/base/Dockerfile | 6 ++++++ docker/base/Dockerfile.mariadb | 6 ++++++ docker/base/Dockerfile.mariadb103 | 6 ++++++ docker/base/Dockerfile.mysql80 | 6 ++++++ docker/base/Dockerfile.percona57 | 6 ++++++ docker/base/Dockerfile.percona80 | 6 ++++++ 6 files changed, 36 insertions(+) diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile index 4a66347dc00..5642abb85f8 100644 --- a/docker/base/Dockerfile +++ b/docker/base/Dockerfile @@ -32,6 +32,12 @@ ARG CGO_ENABLED=0 # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER +# Allows docker builds to set the BUILD_GIT_BRANCH +ARG BUILD_GIT_BRANCH + +# Allows docker builds to set the BUILD_GIT_REV +ARG BUILD_GIT_REV + # Re-copy sources from working tree USER root COPY . /vt/src/vitess.io/vitess diff --git a/docker/base/Dockerfile.mariadb b/docker/base/Dockerfile.mariadb index 5e6cc17a97e..6f10e97adee 100644 --- a/docker/base/Dockerfile.mariadb +++ b/docker/base/Dockerfile.mariadb @@ -9,6 +9,12 @@ ARG CGO_ENABLED=0 # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER +# Allows docker builds to set the BUILD_GIT_BRANCH +ARG BUILD_GIT_BRANCH + +# Allows docker builds to set the BUILD_GIT_REV +ARG BUILD_GIT_REV + # Re-copy sources from working tree USER root COPY . /vt/src/vitess.io/vitess diff --git a/docker/base/Dockerfile.mariadb103 b/docker/base/Dockerfile.mariadb103 index 244c3acbfc0..70dd0aeb778 100644 --- a/docker/base/Dockerfile.mariadb103 +++ b/docker/base/Dockerfile.mariadb103 @@ -9,6 +9,12 @@ ARG CGO_ENABLED=0 # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER +# Allows docker builds to set the BUILD_GIT_BRANCH +ARG BUILD_GIT_BRANCH + +# Allows docker builds to set the BUILD_GIT_REV +ARG BUILD_GIT_REV + # Re-copy sources from working tree USER root COPY . /vt/src/vitess.io/vitess diff --git a/docker/base/Dockerfile.mysql80 b/docker/base/Dockerfile.mysql80 index 29eb7659c35..168723b4d26 100644 --- a/docker/base/Dockerfile.mysql80 +++ b/docker/base/Dockerfile.mysql80 @@ -9,6 +9,12 @@ ARG CGO_ENABLED=0 # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER +# Allows docker builds to set the BUILD_GIT_BRANCH +ARG BUILD_GIT_BRANCH + +# Allows docker builds to set the BUILD_GIT_REV +ARG BUILD_GIT_REV + # Re-copy sources from working tree USER root COPY . /vt/src/vitess.io/vitess diff --git a/docker/base/Dockerfile.percona57 b/docker/base/Dockerfile.percona57 index f80f6345125..1d26af621c1 100644 --- a/docker/base/Dockerfile.percona57 +++ b/docker/base/Dockerfile.percona57 @@ -9,6 +9,12 @@ ARG CGO_ENABLED=0 # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER +# Allows docker builds to set the BUILD_GIT_BRANCH +ARG BUILD_GIT_BRANCH + +# Allows docker builds to set the BUILD_GIT_REV +ARG BUILD_GIT_REV + # Re-copy sources from working tree USER root COPY . /vt/src/vitess.io/vitess diff --git a/docker/base/Dockerfile.percona80 b/docker/base/Dockerfile.percona80 index 7df9ff13db2..026f1bd3ff6 100644 --- a/docker/base/Dockerfile.percona80 +++ b/docker/base/Dockerfile.percona80 @@ -9,6 +9,12 @@ ARG CGO_ENABLED=0 # Allows docker builds to set the BUILD_NUMBER ARG BUILD_NUMBER +# Allows docker builds to set the BUILD_GIT_BRANCH +ARG BUILD_GIT_BRANCH + +# Allows docker builds to set the BUILD_GIT_REV +ARG BUILD_GIT_REV + # Re-copy sources from working tree USER root COPY . /vt/src/vitess.io/vitess