mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-08 17:42:56 +01:00
Fix OS detection in custom-docker-build
Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
parent
0a603faec2
commit
d3aafec77f
1 changed files with 11 additions and 7 deletions
|
|
@ -13,6 +13,16 @@ function get_base_image_reference() {
|
|||
fi
|
||||
}
|
||||
|
||||
function print_os_args() {
|
||||
CUSTOM_BASE_IMAGE=get_base_image_reference "$1"
|
||||
|
||||
if [ -z "$CUSTOM_BASE_IMAGE" ]; then
|
||||
CUSTOM_BASE_IMAGE="$CUSTOM_DOCKER_ARCH/debian:buster"
|
||||
fi
|
||||
|
||||
printf -- "--build-arg CUSTOM_BASE_IMAGE=%s " "$CUSTOM_BASE_IMAGE"
|
||||
}
|
||||
|
||||
function print_golang_args() {
|
||||
declare -A GOLANG_DOWNLOAD_SHA256
|
||||
|
||||
|
|
@ -334,7 +344,7 @@ function parse_arguments() {
|
|||
version="${!tool}"
|
||||
case "$tool" in
|
||||
ARCH) CUSTOM_DOCKER_ARCH=$version ;;
|
||||
OS) CUSTOM_BASE_IMAGE=get_base_image_reference $version ;;
|
||||
OS) print_os_args $version ;;
|
||||
RUBY) print_ruby_args $version ;;
|
||||
BUNDLER) print_bundler_args $version ;;
|
||||
RUBYGEMS) print_rubygems_args $version ;;
|
||||
|
|
@ -357,12 +367,6 @@ function parse_arguments() {
|
|||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$CUSTOM_BASE_IMAGE" ]; then
|
||||
CUSTOM_BASE_IMAGE="$CUSTOM_DOCKER_ARCH/debian:buster"
|
||||
fi
|
||||
|
||||
printf -- "--build-arg CUSTOM_BASE_IMAGE=%s " "$CUSTOM_BASE_IMAGE"
|
||||
}
|
||||
|
||||
function generate_command() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue