mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 18:12:55 +01:00
Gitaly project plans to use PgBouncer for Praefect service https://gitlab.com/gitlab-org/gitaly/-/issues/2816 We want to have an image for CI so we can test interaction of Praefect with PostgreSQL database if PgBouncer sits in between. Installation script added with 1.14.0 version of PgBouncer (latest). Related to: https://gitlab.com/gitlab-org/gitaly/-/issues/2816
22 lines
670 B
Bash
Executable file
22 lines
670 B
Bash
Executable file
#!/bin/bash
|
|
|
|
PGBOUNCER_VERSION=${1}
|
|
PGBOUNCER_DOWNLOAD_SHA256=${2}
|
|
|
|
PGBOUNCER_DOWNLOAD_URL="https://www.pgbouncer.org/downloads/files/${PGBOUNCER_VERSION}/pgbouncer-${PGBOUNCER_VERSION}.tar.gz"
|
|
|
|
curl -fsSL "$PGBOUNCER_DOWNLOAD_URL" -o pgbouncer.zip
|
|
echo "${PGBOUNCER_DOWNLOAD_SHA256} pgbouncer.zip" | sha256sum -c -
|
|
unzip -d /usr/local/bin pgbouncer.zip
|
|
rm pgbouncer.zip
|
|
|
|
curl -o pgbouncer.tar.gz -L https://pgbouncer.github.io/downloads/files/$PGBOUNCER_VERSION/pgbouncer-$PGBOUNCER_VERSION.tar.gz
|
|
|
|
tar xvfz pgbouncer.tar.gz
|
|
cd pgbouncer-${PGBOUNCER_VERSION}
|
|
./configure --prefix=/usr/local
|
|
make
|
|
cp pgbouncer /usr/local/bin
|
|
|
|
cd ..
|
|
rm -rf pgbouncer-${PGBOUNCER_VERSION}
|