From 7dcdf4e1dc1c54699b1305121d159cf9e9bbcec8 Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Fri, 15 Dec 2023 22:38:54 +0900 Subject: [PATCH] Added possibility to build from custom branch --- Dockerfiles/build-mysql/alpine/Dockerfile | 3 ++- Dockerfiles/build-mysql/centos/Dockerfile | 3 ++- Dockerfiles/build-mysql/ol/Dockerfile | 3 ++- Dockerfiles/build-mysql/rhel/Dockerfile | 3 ++- Dockerfiles/build-mysql/ubuntu/Dockerfile | 3 ++- Dockerfiles/build-mysql/windows/Dockerfile.agent | 3 ++- Dockerfiles/build-mysql/windows/Dockerfile.agent2 | 3 ++- Dockerfiles/build-pgsql/alpine/Dockerfile | 3 ++- Dockerfiles/build-pgsql/centos/Dockerfile | 3 ++- Dockerfiles/build-pgsql/ol/Dockerfile | 3 ++- Dockerfiles/build-pgsql/ubuntu/Dockerfile | 3 ++- Dockerfiles/build-sqlite3/alpine/Dockerfile | 3 ++- Dockerfiles/build-sqlite3/centos/Dockerfile | 3 ++- Dockerfiles/build-sqlite3/ol/Dockerfile | 3 ++- Dockerfiles/build-sqlite3/rhel/Dockerfile | 3 ++- Dockerfiles/build-sqlite3/ubuntu/Dockerfile | 3 ++- 16 files changed, 32 insertions(+), 16 deletions(-) diff --git a/Dockerfiles/build-mysql/alpine/Dockerfile b/Dockerfiles/build-mysql/alpine/Dockerfile index 2f36885be..3fe03a171 100644 --- a/Dockerfiles/build-mysql/alpine/Dockerfile +++ b/Dockerfiles/build-mysql/alpine/Dockerfile @@ -8,6 +8,7 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git +ARG GIT_BRANCH=master LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.description="Zabbix build base for MySQL based images" \ @@ -46,7 +47,7 @@ RUN set -eux && \ *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ esac; \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ + git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ patch -p1 < /tmp/chromedp_no_sandbox.patch && \ patch -p1 < /tmp/agent2_build.patch && \ diff --git a/Dockerfiles/build-mysql/centos/Dockerfile b/Dockerfiles/build-mysql/centos/Dockerfile index 914f44937..4b1d7b10b 100644 --- a/Dockerfiles/build-mysql/centos/Dockerfile +++ b/Dockerfiles/build-mysql/centos/Dockerfile @@ -8,6 +8,7 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git +ARG GIT_BRANCH=master LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.description="Zabbix build base for MySQL based images" \ @@ -39,7 +40,7 @@ RUN set -eux && \ *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ esac; \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ + git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ patch -p1 < /tmp/chromedp_no_sandbox.patch && \ zabbix_revision=`git rev-parse --short HEAD` && \ diff --git a/Dockerfiles/build-mysql/ol/Dockerfile b/Dockerfiles/build-mysql/ol/Dockerfile index 2b1d18b88..da2a37495 100644 --- a/Dockerfiles/build-mysql/ol/Dockerfile +++ b/Dockerfiles/build-mysql/ol/Dockerfile @@ -8,6 +8,7 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git +ARG GIT_BRANCH=master LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.description="Zabbix build base for MySQL based images" \ @@ -26,7 +27,7 @@ COPY ["conf/chromedp_no_sandbox.patch", "/tmp/chromedp_no_sandbox.patch"] RUN set -eux && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ + git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ patch -p1 < /tmp/chromedp_no_sandbox.patch && \ zabbix_revision=`git rev-parse --short HEAD` && \ diff --git a/Dockerfiles/build-mysql/rhel/Dockerfile b/Dockerfiles/build-mysql/rhel/Dockerfile index d3a2e3e06..b874e67af 100644 --- a/Dockerfiles/build-mysql/rhel/Dockerfile +++ b/Dockerfiles/build-mysql/rhel/Dockerfile @@ -10,6 +10,7 @@ ARG MAJOR_VERSION ARG RELEASE ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git +ARG GIT_BRANCH=master LABEL description="Zabbix build base for MySQL based images" \ maintainer="alexey.pustovalov@zabbix.com" \ @@ -49,7 +50,7 @@ RUN set -eux && \ *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ esac; \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ + git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ patch -p1 < /tmp/chromedp_no_sandbox.patch && \ zabbix_revision=`git rev-parse --short HEAD` && \ diff --git a/Dockerfiles/build-mysql/ubuntu/Dockerfile b/Dockerfiles/build-mysql/ubuntu/Dockerfile index 13ac86cc5..3bd0ced3d 100644 --- a/Dockerfiles/build-mysql/ubuntu/Dockerfile +++ b/Dockerfiles/build-mysql/ubuntu/Dockerfile @@ -8,6 +8,7 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git +ARG GIT_BRANCH=master LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.description="Zabbix build base for MySQL based images" \ @@ -45,7 +46,7 @@ RUN set -eux && \ *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ esac; \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ + git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ patch -p1 < /tmp/chromedp_no_sandbox.patch && \ zabbix_revision=`git rev-parse --short HEAD` && \ diff --git a/Dockerfiles/build-mysql/windows/Dockerfile.agent b/Dockerfiles/build-mysql/windows/Dockerfile.agent index 4f1d02983..6bf1e53e8 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent @@ -9,6 +9,7 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git +ARG GIT_BRANCH=master ARG ZABBIX_VERSION_RC_NUM=2400 ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION ZBX_VERSION=$ZBX_VERSION ZABBIX_VERSION_RC_NUM=$ZABBIX_VERSION_RC_NUM @@ -30,7 +31,7 @@ RUN Set-Location -Path $env:SystemDrive\.; ` Enter-VsDevShell -VsInstallPath ('{0}\Microsoft Visual Studio\2019\BuildTools' -f ${env:ProgramFiles(x86)}) -DevCmdArguments """-arch=$env:BUILD_ARCH"""; ` ` Write-Host ('Checkout GIT {0} (master) repository ...' -f $env:ZBX_SOURCES); ` - git -c advice.detachedHead=false clone $env:ZBX_SOURCES --branch master --depth 1 --single-branch $env:SystemDrive\zabbix-$env:ZBX_VERSION; ` + git -c advice.detachedHead=false clone $env:ZBX_SOURCES --branch $env:GIT_BRANCH --depth 1 --single-branch $env:SystemDrive\zabbix-$env:ZBX_VERSION; ` ` Write-Host ('Building Zabbix {0} version ...' -f $env:ZBX_VERSION); ` Set-Location -Path $env:SystemDrive\zabbix-$env:ZBX_VERSION; ` diff --git a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 index 81f6f889d..52a2487d2 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 @@ -12,6 +12,7 @@ ARG MAJOR_VERSION=7.0 ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZABBIX_VERSION_RC_NUM=2400 ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git +GIT_BRANCH=master ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION ZBX_VERSION=$ZBX_VERSION ` MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=master ` POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=master @@ -32,7 +33,7 @@ RUN Set-Location -Path $env:SystemDrive\.; ` Enter-VsDevShell -VsInstallPath ('{0}\Microsoft Visual Studio\2019\BuildTools' -f ${env:ProgramFiles(x86)}) -DevCmdArguments """-arch=$env:BUILD_ARCH"""; ` ` Write-Host ('Checkout GIT {0} (master) repository ...' -f $env:ZBX_SOURCES); ` - git -c advice.detachedHead=false clone $env:ZBX_SOURCES --branch master --depth 1 --single-branch $env:SystemDrive\zabbix-$env:ZBX_VERSION; ` + git -c advice.detachedHead=false clone $env:ZBX_SOURCES --branch $env:GIT_BRANCH --depth 1 --single-branch $env:SystemDrive\zabbix-$env:ZBX_VERSION; ` ` Write-Host ('Building Zabbix {0} version ...' -f $env:ZBX_VERSION); ` Set-Location -Path $env:SystemDrive\zabbix-$env:ZBX_VERSION; ` diff --git a/Dockerfiles/build-pgsql/alpine/Dockerfile b/Dockerfiles/build-pgsql/alpine/Dockerfile index f662b1262..1e04c78d2 100644 --- a/Dockerfiles/build-pgsql/alpine/Dockerfile +++ b/Dockerfiles/build-pgsql/alpine/Dockerfile @@ -8,6 +8,7 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git +ARG GIT_BRANCH=master LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.description="Zabbix build base for PostgreSQL based images" \ @@ -46,7 +47,7 @@ RUN set -eux && \ *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ esac; \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ + git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ patch -p1 < /tmp/chromedp_no_sandbox.patch && \ patch -p1 < /tmp/agent2_build.patch && \ diff --git a/Dockerfiles/build-pgsql/centos/Dockerfile b/Dockerfiles/build-pgsql/centos/Dockerfile index 1d4314a60..d4610fa63 100644 --- a/Dockerfiles/build-pgsql/centos/Dockerfile +++ b/Dockerfiles/build-pgsql/centos/Dockerfile @@ -8,6 +8,7 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git +ARG GIT_BRANCH=master LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.description="Zabbix build base for PostgreSQL based images" \ @@ -39,7 +40,7 @@ RUN set -eux && \ *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ esac; \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ + git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ patch -p1 < /tmp/chromedp_no_sandbox.patch && \ zabbix_revision=`git rev-parse --short HEAD` && \ diff --git a/Dockerfiles/build-pgsql/ol/Dockerfile b/Dockerfiles/build-pgsql/ol/Dockerfile index cd4273282..0e3ee4b66 100644 --- a/Dockerfiles/build-pgsql/ol/Dockerfile +++ b/Dockerfiles/build-pgsql/ol/Dockerfile @@ -8,6 +8,7 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git +ARG GIT_BRANCH=master LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.description="Zabbix build base for PostgreSQL based images" \ @@ -26,7 +27,7 @@ COPY ["conf/chromedp_no_sandbox.patch", "/tmp/chromedp_no_sandbox.patch"] RUN set -eux && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ + git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ patch -p1 < /tmp/chromedp_no_sandbox.patch && \ zabbix_revision=`git rev-parse --short HEAD` && \ diff --git a/Dockerfiles/build-pgsql/ubuntu/Dockerfile b/Dockerfiles/build-pgsql/ubuntu/Dockerfile index 0ad83a6ac..50e9da2c2 100644 --- a/Dockerfiles/build-pgsql/ubuntu/Dockerfile +++ b/Dockerfiles/build-pgsql/ubuntu/Dockerfile @@ -8,6 +8,7 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git +ARG GIT_BRANCH=master LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.description="Zabbix build base for PostgreSQL based images" \ @@ -45,7 +46,7 @@ RUN set -eux && \ *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ esac; \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ + git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ patch -p1 < /tmp/chromedp_no_sandbox.patch && \ zabbix_revision=`git rev-parse --short HEAD` && \ diff --git a/Dockerfiles/build-sqlite3/alpine/Dockerfile b/Dockerfiles/build-sqlite3/alpine/Dockerfile index 8132f578a..b8f080cd4 100644 --- a/Dockerfiles/build-sqlite3/alpine/Dockerfile +++ b/Dockerfiles/build-sqlite3/alpine/Dockerfile @@ -8,6 +8,7 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git +ARG GIT_BRANCH=master LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.description="Zabbix build base for SQLite3 based images" \ @@ -45,7 +46,7 @@ RUN set -eux && \ *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ esac; \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ + git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ patch -p1 < /tmp/agent2_build.patch && \ zabbix_revision=`git rev-parse --short HEAD` && \ diff --git a/Dockerfiles/build-sqlite3/centos/Dockerfile b/Dockerfiles/build-sqlite3/centos/Dockerfile index 8e069c47c..1b117869b 100644 --- a/Dockerfiles/build-sqlite3/centos/Dockerfile +++ b/Dockerfiles/build-sqlite3/centos/Dockerfile @@ -8,6 +8,7 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git +ARG GIT_BRANCH=master LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.description="Zabbix build base for SQLite3 based images" \ @@ -37,7 +38,7 @@ RUN set -eux && \ *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ esac; \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ + git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ zabbix_revision=`git rev-parse --short HEAD` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ diff --git a/Dockerfiles/build-sqlite3/ol/Dockerfile b/Dockerfiles/build-sqlite3/ol/Dockerfile index df14e2d9b..21dfba090 100644 --- a/Dockerfiles/build-sqlite3/ol/Dockerfile +++ b/Dockerfiles/build-sqlite3/ol/Dockerfile @@ -8,6 +8,7 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git +ARG GIT_BRANCH=master LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.description="Zabbix build base for SQLite3 based images" \ @@ -24,7 +25,7 @@ ENV MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLU RUN set -eux && \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ + git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ zabbix_revision=`git rev-parse --short HEAD` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ diff --git a/Dockerfiles/build-sqlite3/rhel/Dockerfile b/Dockerfiles/build-sqlite3/rhel/Dockerfile index 7f0e73d1b..199768bae 100644 --- a/Dockerfiles/build-sqlite3/rhel/Dockerfile +++ b/Dockerfiles/build-sqlite3/rhel/Dockerfile @@ -10,6 +10,7 @@ ARG MAJOR_VERSION ARG RELEASE ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git +ARG GIT_BRANCH=master LABEL description="Zabbix build base for SQLite3 based images" \ maintainer="alexey.pustovalov@zabbix.com" \ @@ -47,7 +48,7 @@ RUN set -eux && \ *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ esac; \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ + git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ zabbix_revision=`git rev-parse --short HEAD` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ diff --git a/Dockerfiles/build-sqlite3/ubuntu/Dockerfile b/Dockerfiles/build-sqlite3/ubuntu/Dockerfile index 669acab00..4ce28f8e4 100644 --- a/Dockerfiles/build-sqlite3/ubuntu/Dockerfile +++ b/Dockerfiles/build-sqlite3/ubuntu/Dockerfile @@ -8,6 +8,7 @@ FROM ${BUILD_BASE_IMAGE} as builder ARG MAJOR_VERSION ARG ZBX_VERSION ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git +ARG GIT_BRANCH=master LABEL org.opencontainers.image.authors="Alexey Pustovalov " \ org.opencontainers.image.description="Zabbix build base for SQLite3 based images" \ @@ -43,7 +44,7 @@ RUN set -eux && \ *) echo "Unknown ARCH_SUFFIX=${ARCH_SUFFIX-}"; exit 1 ;; \ esac; \ cd /tmp/ && \ - git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ + git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \ cd /tmp/zabbix-${ZBX_VERSION} && \ zabbix_revision=`git rev-parse --short HEAD` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \