From 343175b16ea73e86b1fc92adf667265d1a01e7c1 Mon Sep 17 00:00:00 2001 From: Doug Aaser Date: Mon, 26 Aug 2019 15:15:05 +0000 Subject: [PATCH] Pin Patroni to v1.5.6 Pin the version of Patroni to v1.5.6 to prevent any issues that may arise with using an new, untested version. Change-Id: Iea6b2e57b3a0319e8bcf98d23619d824cae97349 --- patroni/Dockerfile.ubuntu_xenial | 4 +++- patroni/build.sh | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/patroni/Dockerfile.ubuntu_xenial b/patroni/Dockerfile.ubuntu_xenial index 2ea3f1d..c3e6914 100644 --- a/patroni/Dockerfile.ubuntu_xenial +++ b/patroni/Dockerfile.ubuntu_xenial @@ -1,6 +1,8 @@ FROM postgres:9.5 MAINTAINER Alexander Kukushkin +ARG PATRONI_VERSION + RUN export DEBIAN_FRONTEND=noninteractive \ && echo 'APT::Install-Recommends "0";\nAPT::Install-Suggests "0";' > /etc/apt/apt.conf.d/01norecommend \ && apt-get update -y \ @@ -11,7 +13,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ ## Make sure we have a en_US.UTF-8 locale available && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ && pip3 install setuptools \ - && pip3 install 'git+https://github.com/zalando/patroni.git#egg=patroni[kubernetes]' \ + && pip3 install "git+https://github.com/zalando/patroni.git@${PATRONI_VERSION}#egg=patroni[kubernetes]" \ && PGHOME=/home/postgres \ && mkdir -p $PGHOME \ && chown postgres $PGHOME \ diff --git a/patroni/build.sh b/patroni/build.sh index e84851e..8a2ace4 100755 --- a/patroni/build.sh +++ b/patroni/build.sh @@ -9,6 +9,12 @@ VERSION=${VERSION:-latest} DISTRO=${DISTRO:-ubuntu_xenial} REGISTRY_URI=${REGISTRY_URI:-"openstackhelm/"} EXTRA_TAG_INFO=${EXTRA_TAG_INFO:-""} -docker build -f ${IMAGE}/Dockerfile.${DISTRO} --network=host -t ${REGISTRY_URI}${IMAGE}:${VERSION}-${DISTRO}${EXTRA_TAG_INFO} ${extra_build_args} ${IMAGE} + +PATRONI_VERSION=${PATRONI_VERSION:-v1.5.6} + +docker build -f ${IMAGE}/Dockerfile.${DISTRO} --network=host \ + -t ${REGISTRY_URI}${IMAGE}:${VERSION}-${DISTRO}${EXTRA_TAG_INFO} \ + --build-arg PATRONI_VERSION=${PATRONI_VERSION} \ + ${extra_build_args} ${IMAGE} cd -