Normalize Docker image name for building a static image via matrix
What does this MR do and why?
Normalize Docker image name for building a static image via matrix.
Normalizing the image name unlocks the ability for using parallel:matrix
keyword in out CI pipeline for building multiple images at once, for instance, aarch64
and amd64
. Before we used bash argument $1
for getting the image name but in parallel:matrix
builds this argument has a colon :
at the end which is invalid for a Docker image name. The fix is quite simple - remove the colon before starting the build.
parallel:matrix enabled? |
$1 value |
---|---|
No | danger |
Yes | danger: |
See it in action here - https://gitlab.com/gitlab-org/gitlab-build-images/-/pipelines/970662467
Checklist
-
(If applicable) Add patches if required for upgrading Ruby version in https://gitlab.com/gitlab-org/gitlab-build-images/-/tree/master/patches/ruby.
Edited by Vitaly Slobodin