devops: mirror chromium builds to our CDN (#3357)

Start mirroring chromium builds to our CDN.

References #3259
This commit is contained in:
Andrey Lushnikov 2020-08-07 16:22:05 -07:00 committed by GitHub
parent 69c88d8063
commit 2a0cbda8bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 131 additions and 2 deletions

View File

@ -67,3 +67,9 @@ git pull origin master
git pull origin master
../checkout_build_archive_upload.sh webkit-ubuntu-18.04 >/tmp/$(basename $0)--webkit.log || true
git pull origin master
../checkout_build_archive_upload.sh chromium-linux-mirror-to-cdn >/tmp/$(basename $0)--chromium-linux.log || true
../checkout_build_archive_upload.sh chromium-mac-mirror-to-cdn >/tmp/$(basename $0)--chromium-mac.log || true
../checkout_build_archive_upload.sh chromium-win32-mirror-to-cdn >/tmp/$(basename $0)--chromium-win32.log || true
../checkout_build_archive_upload.sh chromium-win64-mirror-to-cdn >/tmp/$(basename $0)--chromium-win64.log || true

View File

@ -36,7 +36,31 @@ BUILD_FLAVOR="$1"
BUILD_BLOB_NAME=""
EXPECTED_HOST_OS=""
EXPECTED_HOST_OS_VERSION=""
if [[ "$BUILD_FLAVOR" == "firefox-ubuntu-18.04" ]]; then
if [[ "$BUILD_FLAVOR" == "chromium-linux-mirror-to-cdn" ]]; then
BROWSER_NAME="chromium"
EXTRA_BUILD_ARGS="--linux"
EXPECTED_HOST_OS="Ubuntu"
EXPECTED_HOST_OS_VERSION="18.04"
BUILD_BLOB_NAME="chromium-linux.zip"
elif [[ "$BUILD_FLAVOR" == "chromium-mac-mirror-to-cdn" ]]; then
BROWSER_NAME="chromium"
EXTRA_BUILD_ARGS="--mac"
EXPECTED_HOST_OS="Ubuntu"
EXPECTED_HOST_OS_VERSION="18.04"
BUILD_BLOB_NAME="chromium-mac.zip"
elif [[ "$BUILD_FLAVOR" == "chromium-win32-mirror-to-cdn" ]]; then
BROWSER_NAME="chromium"
EXTRA_BUILD_ARGS="--win32"
EXPECTED_HOST_OS="Ubuntu"
EXPECTED_HOST_OS_VERSION="18.04"
BUILD_BLOB_NAME="chromium-win32.zip"
elif [[ "$BUILD_FLAVOR" == "chromium-win64-mirror-to-cdn" ]]; then
BROWSER_NAME="chromium"
EXTRA_BUILD_ARGS="--win64"
EXPECTED_HOST_OS="Ubuntu"
EXPECTED_HOST_OS_VERSION="18.04"
BUILD_BLOB_NAME="chromium-win64.zip"
elif [[ "$BUILD_FLAVOR" == "firefox-ubuntu-18.04" ]]; then
BROWSER_NAME="firefox"
EXPECTED_HOST_OS="Ubuntu"
EXPECTED_HOST_OS_VERSION="18.04"

1
browser_patches/chromium/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/output

View File

@ -0,0 +1 @@
792639

View File

@ -0,0 +1,34 @@
#!/bin/bash
set -e
set +x
if [[ ("$1" == "-h") || ("$1" == "--help") ]]; then
echo "usage: $(basename $0) [output-absolute-path]"
echo
echo "Generate distributable .zip archive from ./output folder that was previously downloaded."
echo
exit 0
fi
ZIP_PATH=$1
if [[ $ZIP_PATH != /* ]]; then
echo "ERROR: path $ZIP_PATH is not absolute"
exit 1
fi
if [[ $ZIP_PATH != *.zip ]]; then
echo "ERROR: path $ZIP_PATH must have .zip extension"
exit 1
fi
if [[ -f $ZIP_PATH ]]; then
echo "ERROR: path $ZIP_PATH exists; can't do anything."
exit 1
fi
if ! [[ -d $(dirname $ZIP_PATH) ]]; then
echo "ERROR: folder for path $($ZIP_PATH) does not exist."
exit 1
fi
trap "cd $(pwd -P)" EXIT
cd "$(dirname $0)"
cp output/archive.zip $ZIP_PATH

View File

@ -0,0 +1,33 @@
#!/bin/bash
set -e
set +x
trap "cd $(pwd -P)" EXIT
cd "$(dirname $0)"
mkdir -p output
cd output
BUILD_NUMBER=$(head -1 ../BUILD_NUMBER)
FOLDER_NAME=""
ZIP_NAME=""
if [[ $1 == "--win32" ]]; then
FOLDER_NAME="Win"
ZIP_NAME="chrome-win.zip"
elif [[ $1 == "--win64" ]]; then
FOLDER_NAME="Win_x64"
ZIP_NAME="chrome-win.zip"
elif [[ $1 == "--mac" ]]; then
FOLDER_NAME="Mac"
ZIP_NAME="chrome-mac.zip"
elif [[ $1 == "--linux" ]]; then
FOLDER_NAME="Linux_x64"
ZIP_NAME="chrome-linux.zip"
else
echo "ERROR: unknown platform to build: $1"
exit 1
fi
URL="https://storage.googleapis.com/chromium-browser-snapshots/${FOLDER_NAME}/${BUILD_NUMBER}/${ZIP_NAME}"
curl --output archive.zip "${URL}"

View File

@ -0,0 +1,9 @@
#!/bin/bash
set -e
set +x
trap "cd $(pwd -P)" EXIT
cd "$(dirname $0)"
rm -rf output

View File

@ -33,7 +33,10 @@ PATCHES_PATH=""
BUILD_NUMBER=""
WEBKIT_EXTRA_FOLDER_PATH=""
FIREFOX_EXTRA_FOLDER_PATH=""
if [[ ("$1" == "firefox") || ("$1" == "firefox/") || ("$1" == "ff") ]]; then
if [[ ("$1" == "chromium") || ("$1" == "chromium/") || ("$1" == "cr") ]]; then
echo "FYI: chromium checkout is not supported."
exit 0
elif [[ ("$1" == "firefox") || ("$1" == "firefox/") || ("$1" == "ff") ]]; then
FRIENDLY_CHECKOUT_PATH="//browser_patches/firefox/checkout";
CHECKOUT_PATH="$PWD/firefox/checkout"
PATCHES_PATH="$PWD/firefox/patches"

View File

@ -51,6 +51,20 @@ WK_ALIASES=(
"WK-WIN64"
)
CR_REVISION=$(head -1 ../chromium/BUILD_NUMBER)
CR_ARCHIVES=(
"$HOST/chromium/%s/chromium-mac.zip"
"$HOST/chromium/%s/chromium-linux.zip"
"$HOST/chromium/%s/chromium-win32.zip"
"$HOST/chromium/%s/chromium-win64.zip"
)
CR_ALIASES=(
"CR-MAC"
"CR-LINUX"
"CR-WIN32"
"CR-WIN64"
)
COLUMN="%-18s"
# COLORS
RED=$'\e[1;31m'
@ -69,6 +83,10 @@ elif [[ ("$1" == "webkit") || ("$1" == "webkit/") ]]; then
REVISION=$WK_REVISION
ARCHIVES=("${WK_ARCHIVES[@]}")
ALIASES=("${WK_ALIASES[@]}")
elif [[ ("$1" == "chromium") || ("$1" == "chromium/") ]]; then
REVISION=$CR_REVISION
ARCHIVES=("${CR_ARCHIVES[@]}")
ALIASES=("${CR_ALIASES[@]}")
else
echo ERROR: unknown browser - "$1"
exit 1