Integrate gcloud and kubectl in custom build

This commit is contained in:
Andrejs Cunskis 2022-04-28 18:32:48 +03:00
parent 5cd81e9b3c
commit 7a97735026
No known key found for this signature in database
GPG key ID: 87CB75083F227241

View file

@ -215,6 +215,28 @@ function print_ruby_args() {
printf -- "--build-arg RUBY_DOWNLOAD_SHA256=%s " "$RUBY_DOWNLOAD_SHA256"
}
function print_gcloud_args() {
case "$1" in
383)
BAZELISK_VERSION=383.0.1
;;
*) echo "Unknown gcloud version $1"; exit 1;
esac
printf -- "--build-arg GCLOUD_VERSION=%s " "$GCLOUD_VERSION"
}
function print_kubectl_args() {
case "$1" in
1.23)
BAZELISK_VERSION=1.23.0
;;
*) echo "Unknown gcloud version $1"; exit 1;
esac
printf -- "--build-arg KUBECTL_VERSION=%s " "$KUBECTL_VERSION"
}
function parse_arguments() {
printf -- "-f Dockerfile.custom "
@ -239,6 +261,8 @@ function parse_arguments() {
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 ;;
*) echo "unknown tool $tool"; exit 1;;
esac
fi