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
|
|
@ -15,7 +15,7 @@ function save-package() {
|
|||
local REGISTRY_PACKAGE=${4:-$PKG}
|
||||
local SOURCE_DEB=${5:-$DEB}
|
||||
|
||||
local URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${REGISTRY_PACKAGE}/${LATEST_VERSION}/${DEB}"
|
||||
local URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${BUILD_OS}-${OS_VERSION}-${REGISTRY_PACKAGE}/${LATEST_VERSION}/${DEB}"
|
||||
|
||||
echo "Checking if ${PKG} v${LATEST_VERSION} is already cached"
|
||||
local FILE_CHECK=$(curl --silent --location --head --output /dev/null --write "%{http_code}\\n" "$URL")
|
||||
|
|
@ -81,6 +81,7 @@ function cache-chromium() {
|
|||
|
||||
function notify-chrome-updated() {
|
||||
[ ! -f chrome-version ] && exit
|
||||
[ -z "$CI_SLACK_WEBHOOK_URL" ] && exit
|
||||
|
||||
local chrome_version=$(cat chrome-version)
|
||||
local msg="New version of chrome has been released: \`${chrome_version}\`!\n"
|
||||
|
|
@ -103,5 +104,5 @@ if [ "$TARGETARCH" == "amd64" ]; then
|
|||
cache-chromium
|
||||
else
|
||||
cache-chromium
|
||||
notify-chrome-updated
|
||||
[ "$NOTIFY_VERSION_UPDATE" == "true" ] && notify-chrome-updated || exit 0
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue