mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-10 02:22:57 +01:00
Cache chrome for correct debian version
This commit is contained in:
parent
03d90d36f2
commit
7d00e776ae
7 changed files with 40 additions and 13 deletions
|
|
@ -48,18 +48,26 @@ function build_debian() {
|
|||
rm -rf /etc/apt/sources.list.d/google*.list
|
||||
}
|
||||
|
||||
function build_ubi() {
|
||||
echo "This OS is not supported for chrome install!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
BUILD_OS=${BUILD_OS:-debian}
|
||||
OS_VERSION=${OS_VERSION:-bullseye}
|
||||
CHROME_VERSION=${1:-107.0.5304.87-1}
|
||||
ARCH=${TARGETARCH:-amd64}
|
||||
if [ "${ARCH}" == "amd64" ]; then
|
||||
PKG=google-chrome-stable
|
||||
else
|
||||
PKG=chromium
|
||||
fi
|
||||
DOWNLOAD_URL_BASE="https://gitlab.com/api/v4/projects/1075790/packages/generic/${PKG}"
|
||||
PKG=$([ "${ARCH}" == "amd64" ] && echo "google-chrome-stable" || echo "chromium")
|
||||
DOWNLOAD_URL_BASE="https://gitlab.com/api/v4/projects/1075790/packages/generic/${BUILD_OS}-${OS_VERSION}-${PKG}"
|
||||
|
||||
if [[ $BUILD_OS =~ debian ]]; then
|
||||
build_debian "$@"
|
||||
elif [[ $BUILD_OS =~ ubi ]]; then
|
||||
build_ubi "$@"
|
||||
fi
|
||||
|
||||
if [ "${ARCH}" == "amd64" ]; then
|
||||
google-chrome --version
|
||||
else
|
||||
chromium --version
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue