Merge branch 'pks-gitaly-simplify-images' into 'master'

gitaly: Simplify build images

See merge request gitlab-org/gitlab-build-images!565
This commit is contained in:
Balasankar 'Balu' C 2022-07-06 07:40:01 +00:00
commit ca196275d2
6 changed files with 3 additions and 47 deletions

View file

@ -9,6 +9,4 @@ gitaly:
- OS: ['debian:bullseye']
RUBY: ['2.7', '3.0']
GOLANG: ['1.17', '1.18']
GIT: ['2.33']
PGBOUNCER: ['1.14', '']
POSTGRESQL: ['11', '12', '13'] # We only use the postgresql-client
GIT: ['2.36']

View file

@ -79,12 +79,6 @@ ARG BUILDX_DOWNLOAD_SHA256
RUN if [ -n "$BUILDX_VERSION" ]; then /scripts/install-buildx $BUILDX_VERSION $BUILDX_DOWNLOAD_SHA256; fi
# PgBouncer
ARG PGBOUNCER_VERSION
ARG PGBOUNCER_DOWNLOAD_SHA256
RUN if [ -n "$PGBOUNCER_VERSION" ] ; then /scripts/install-pgbouncer $PGBOUNCER_VERSION $PGBOUNCER_DOWNLOAD_SHA256; fi
# Bazelisk
ARG BAZELISK_VERSION
ARG BAZELISK_DOWNLOAD_SHA256
@ -127,7 +121,6 @@ ENV RUBY_VERSION=${RUBY_VERSION} \
POSTGRES_VERSION=${POSTGRES_VERSION} \
GRAPHISMAGICK_VERSION=${GRAPHISMAGICK_VERSION} \
DOCKER_VERSION=${DOCKER_VERSION} \
PGBOUNCER_VERSION=${PGBOUNCER_VERSION} \
BAZELISK_VERSION=${BAZELISK_VERSION} \
GCLOUD_VERSION=${GCLOUD_VERSION} \
KUBECTL_VERSION=${KUBECTL_VERSION} \

View file

@ -55,7 +55,6 @@ options are:
1. `graphicsmagick`
1. `lfs`
1. `node`
1. `pgbouncer`
1. `postgresql`
1. `ruby`
1. `yarn`

View file

@ -1,18 +0,0 @@
#!/bin/bash
set -xeuo pipefail
PGBOUNCER_VERSION=${1}
PGBOUNCER_DOWNLOAD_SHA256=${2}
PGBOUNCER_DOWNLOAD_URL="https://pgbouncer.github.io/downloads/files/$PGBOUNCER_VERSION/pgbouncer-$PGBOUNCER_VERSION.tar.gz"
curl -o pgbouncer.tar.gz -fsSL $PGBOUNCER_DOWNLOAD_URL \
&& echo "${PGBOUNCER_DOWNLOAD_SHA256} pgbouncer.tar.gz" | sha256sum -c - \
&& tar xfz pgbouncer.tar.gz \
&& rm -f pgbouncer.tar.gz \
&& cd pgbouncer-${PGBOUNCER_VERSION} \
&& ./configure --prefix=/usr/local \
&& make \
&& cp pgbouncer /usr/local/bin \
&& cd .. \
&& rm -rf pgbouncer-${PGBOUNCER_VERSION}

View file

@ -172,19 +172,6 @@ function print_graphicsmagick_args() {
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 print_bazelisk_args() {
case "$1" in
1.9.0)
@ -340,7 +327,6 @@ function parse_arguments() {
YARN) print_yarn_args $version ;;
POSTGRESQL) print_postgres_args $version ;;
GRAPHICSMAGICK) print_graphicsmagick_args $version ;;
PGBOUNCER) print_pgbouncer_args $version ;;
BAZELISK) print_bazelisk_args $version ;;
GCLOUD) print_gcloud_args $version ;;
KUBECTL) print_kubectl_args $version ;;

View file

@ -2,7 +2,7 @@
# various variable operations used in this script.
PATH_TOOLS=(OS RUBY GOLANG NODE POSTGRESQL)
TAG_TOOLS=(BUNDLER RUBYGEMS GIT LFS CHROME YARN GRAPHICSMAGICK PGBOUNCER BAZELISK DOCKER BUILDX GCLOUD KUBECTL HELM)
TAG_TOOLS=(BUNDLER RUBYGEMS GIT LFS CHROME YARN GRAPHICSMAGICK BAZELISK DOCKER BUILDX GCLOUD KUBECTL HELM)
# Generate the docker image path using the components that were specified via
# variables.
@ -11,7 +11,6 @@ TAG_TOOLS=(BUNDLER RUBYGEMS GIT LFS CHROME YARN GRAPHICSMAGICK PGBOUNCER BAZELIS
# RUBY: 2.7
# GOLANG: 1.16
# GIT: 2.33
# PGBOUNCER: 1.14
# POSTGRESQL: 11
# With the above variables, this function will return
# `debian-bullseye-ruby-2.7-golang-1.16-postgresql-11`
@ -46,10 +45,9 @@ function get_image_path() {
# RUBY: 2.7
# GOLANG: 1.16
# GIT: 2.33
# PGBOUNCER: 1.14
# POSTGRESQL: 11
# For that job, this function will return
# `git-2.33-pgbouncer-1.14`
# `git-2.33`
function get_image_tag() {
local tag
tag=""