Welcome to the matrix

This refactors our custom image building to utilize GitLab parallel jobs
with a matrix.

This makes it easier to parse what kind of matrix we are going to build
in our docker images. Furthermore instead of splitting the image name,
we can simply pull the versions of the tools from the environment
variables.

The ultimative reason: Dogfooding
This commit is contained in:
Lukas Eipert 2021-11-26 17:06:29 +01:00
parent 32d1908296
commit a9cf88c469
11 changed files with 325 additions and 292 deletions

View file

@ -0,0 +1,12 @@
TOOLS=(RUBY GOLANG GIT LFS CHROME NODE YARN POSTGRESQL GRAPHICSMAGICK PGBOUNCER BAZELISK)
function get_image_name(){
local IMAGE_NAME
IMAGE_NAME=""
for tool in "${TOOLS[@]}"; do
if [ -n "${!tool}" ]; then
IMAGE_NAME="${IMAGE_NAME}-${tool,,}-${!tool}"
fi
done
echo "${IMAGE_NAME:1}"
}