mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 10:02:56 +01:00
Add Bazelisk support to Dockerfile.custom
This commit is contained in:
parent
5c31ab00a7
commit
a7e1e727ef
5 changed files with 45 additions and 1 deletions
|
|
@ -185,6 +185,19 @@ function print_pgbouncer_args() {
|
|||
printf -- "--build-arg PGBOUNCER_DOWNLOAD_SHA256=%s " "$PGBOUNCER_DOWNLOAD_SHA256"
|
||||
}
|
||||
|
||||
function print_bazelisk_args() {
|
||||
case "$1" in
|
||||
1.9.0)
|
||||
BAZELISK_VERSION=1.9.0
|
||||
BAZELISK_DOWNLOAD_SHA256=b8c7f2a1b07ad64a2f27f8f19a202f90d044de7b5b6ccc387a6fe5d4a8ec4937
|
||||
;;
|
||||
*) echo "Unknown bazelisk version $1"; exit 1;
|
||||
esac
|
||||
|
||||
printf -- "--build-arg BAZELISK_VERSION=%s " "$BAZELISK_VERSION"
|
||||
printf -- "--build-arg BAZELISK_DOWNLOAD_SHA256=%s " "$BAZELISK_DOWNLOAD_SHA256"
|
||||
}
|
||||
|
||||
function print_ruby_args() {
|
||||
case "$1" in
|
||||
2.6|2.6.*)
|
||||
|
|
@ -230,6 +243,7 @@ function parse_arguments() {
|
|||
postgresql) print_postgres_args $version ;;
|
||||
graphicsmagick) print_graphicsmagick_args $version ;;
|
||||
pgbouncer) print_pgbouncer_args $version ;;
|
||||
bazelisk) print_bazelisk_args $version ;;
|
||||
*) exit 1;;
|
||||
esac
|
||||
done
|
||||
|
|
|
|||
14
scripts/install-bazelisk
Executable file
14
scripts/install-bazelisk
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -xeou pipefail
|
||||
|
||||
BAZELISK_VERSION=${1}
|
||||
BAZELISK_DOWNLOAD_SHA256=${2}
|
||||
|
||||
BAZELISK_DOWNLOAD_URL="https://github.com/bazelbuild/bazelisk/releases/download/v${BAZELISK_VERSION}/bazelisk-linux-amd64"
|
||||
|
||||
curl -fsSL "$BAZELISK_DOWNLOAD_URL" -o bazelisk
|
||||
echo "${BAZELISK_DOWNLOAD_SHA256} bazelisk" | sha256sum -c -
|
||||
|
||||
chmod +x bazelisk
|
||||
mv bazelisk /usr/local/bin/bazel
|
||||
Loading…
Add table
Add a link
Reference in a new issue