mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-11 02:52:56 +01:00
Merge branch 'ps-pgbouncer' into 'master'
Add PgBouncer as image option See merge request gitlab-org/gitlab-build-images!310
This commit is contained in:
commit
d0dde6dab2
5 changed files with 44 additions and 0 deletions
|
|
@ -66,6 +66,7 @@ ruby-2.6-golang-1.13-git-2.27 test: *test_custom
|
||||||
ruby-2.6-golang-1.14-git-2.25 test: *test_custom
|
ruby-2.6-golang-1.14-git-2.25 test: *test_custom
|
||||||
ruby-2.6-golang-1.14-git-2.26 test: *test_custom
|
ruby-2.6-golang-1.14-git-2.26 test: *test_custom
|
||||||
ruby-2.6-golang-1.14-git-2.27 test: *test_custom
|
ruby-2.6-golang-1.14-git-2.27 test: *test_custom
|
||||||
|
ruby-2.6-golang-1.14-git-2.27-pgbouncer-1.14 test: *test_custom
|
||||||
|
|
||||||
# Used by GitLab: https://gitlab.com/gitlab-org/gitlab/blob/master/.gitlab-ci.yml
|
# Used by GitLab: https://gitlab.com/gitlab-org/gitlab/blob/master/.gitlab-ci.yml
|
||||||
ruby-2.6.6-golang-1.14-git-2.27-lfs-2.9-chrome-83-node-12.x-yarn-1.21-postgresql-11-graphicsmagick-1.3.34 test: *test_custom
|
ruby-2.6.6-golang-1.14-git-2.27-lfs-2.9-chrome-83-node-12.x-yarn-1.21-postgresql-11-graphicsmagick-1.3.34 test: *test_custom
|
||||||
|
|
@ -127,6 +128,7 @@ ruby-2.6-golang-1.13-git-2.27: *build_and_deploy_custom
|
||||||
ruby-2.6-golang-1.14-git-2.25: *build_and_deploy_custom
|
ruby-2.6-golang-1.14-git-2.25: *build_and_deploy_custom
|
||||||
ruby-2.6-golang-1.14-git-2.26: *build_and_deploy_custom
|
ruby-2.6-golang-1.14-git-2.26: *build_and_deploy_custom
|
||||||
ruby-2.6-golang-1.14-git-2.27: *build_and_deploy_custom
|
ruby-2.6-golang-1.14-git-2.27: *build_and_deploy_custom
|
||||||
|
ruby-2.6-golang-1.14-git-2.27-pgbouncer-1.14: *build_and_deploy_custom
|
||||||
|
|
||||||
# Used by GitLab CE/EE: https://gitlab.com/gitlab-org/gitlab-ee/blob/master/.gitlab-ci.yml
|
# Used by GitLab CE/EE: https://gitlab.com/gitlab-org/gitlab-ee/blob/master/.gitlab-ci.yml
|
||||||
ruby-2.6.6-golang-1.14-git-2.27-lfs-2.9-chrome-83-node-12.x-yarn-1.21-postgresql-11-graphicsmagick-1.3.34: *build_and_deploy_custom
|
ruby-2.6.6-golang-1.14-git-2.27-lfs-2.9-chrome-83-node-12.x-yarn-1.21-postgresql-11-graphicsmagick-1.3.34: *build_and_deploy_custom
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,11 @@ RUN if [ -n "$GRAPHISMAGICK_VERSION" ]; then /scripts/install-graphicsmagick &&
|
||||||
ARG DOCKER_VERSION
|
ARG DOCKER_VERSION
|
||||||
RUN if [ -n "$DOCKER_VERSION" ]; then /scripts/install-docker $DOCKER_VERSION; fi
|
RUN if [ -n "$DOCKER_VERSION" ]; then /scripts/install-docker $DOCKER_VERSION; fi
|
||||||
|
|
||||||
|
# PgBouncer
|
||||||
|
ARG PGBOUNCER_VERSION
|
||||||
|
ARG PGBOUNCER_DOWNLOAD_SHA256
|
||||||
|
RUN if [ -n "$PGBOUNCER_VERSION" ] ; then /scripts/install-pgbouncer $PGBOUNCER_VERSION $PGBOUNCER_DOWNLOAD_SHA256; fi
|
||||||
|
|
||||||
RUN locale-gen en_US.UTF-8
|
RUN locale-gen en_US.UTF-8
|
||||||
ENV LANG en_US.UTF-8
|
ENV LANG en_US.UTF-8
|
||||||
ENV LANGUAGE en_US:en
|
ENV LANGUAGE en_US:en
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ options are:
|
||||||
1. `terraform`
|
1. `terraform`
|
||||||
1. `ansible`
|
1. `ansible`
|
||||||
1. `graphicsmagick`
|
1. `graphicsmagick`
|
||||||
|
1. `pgbouncer`
|
||||||
|
|
||||||
#### Adding a new build
|
#### Adding a new build
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,19 @@ function print_graphicsmagick_args() {
|
||||||
printf -- "--build-arg GRAPHISMAGICK_DOWNLOAD_SHA256=%s " "$GRAPHISMAGICK_DOWNLOAD_SHA256"
|
printf -- "--build-arg GRAPHISMAGICK_DOWNLOAD_SHA256=%s " "$GRAPHISMAGICK_DOWNLOAD_SHA256"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function print_pgbouncer_args() {
|
||||||
|
case "$1" in
|
||||||
|
1.14)
|
||||||
|
PGBOUNCER_VERSION=1.14.0
|
||||||
|
PGBOUNCER_DOWNLOAD_SHA256=a0c13d10148f557e36ff7ed31793abb7a49e1f8b09aa2d4695d1c28fa101fee7
|
||||||
|
;;
|
||||||
|
*) echo "Unknown pgbouncer version $1"; exit 1;
|
||||||
|
esac
|
||||||
|
|
||||||
|
printf -- "--build-arg PGBOUNCER_VERSION=%s " "$PGBOUNCER_VERSION"
|
||||||
|
printf -- "--build-arg PGBOUNCER_DOWNLOAD_SHA256=%s " "$PGBOUNCER_DOWNLOAD_SHA256"
|
||||||
|
}
|
||||||
|
|
||||||
function parse_arguments() {
|
function parse_arguments() {
|
||||||
read base
|
read base
|
||||||
read base_version
|
read base_version
|
||||||
|
|
@ -206,6 +219,7 @@ function parse_arguments() {
|
||||||
ansible) print_ansible_args $version ;;
|
ansible) print_ansible_args $version ;;
|
||||||
terraform) print_terraform_args $version ;;
|
terraform) print_terraform_args $version ;;
|
||||||
graphicsmagick) print_graphicsmagick_args $version ;;
|
graphicsmagick) print_graphicsmagick_args $version ;;
|
||||||
|
pgbouncer) print_pgbouncer_args $version ;;
|
||||||
*) exit 1;;
|
*) exit 1;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
|
||||||
22
scripts/install-pgbouncer
Executable file
22
scripts/install-pgbouncer
Executable file
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/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}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue