-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Google Chrome #5651
Comments
@malesci, the new image rollout is in progress, we are planning to finish it by Friday. |
Thanks for update. Waiting for the rollout finish, is it possible in the use the the runner with the updated chrome in meanwhile? |
You can't specify runner version. |
@malesci you can install the latest version of chrome and chromedriver in runtime to not wait for the deployment to finish download_with_retries() {
# Due to restrictions of bash functions, positional arguments are used here.
# In case if you using latest argument NAME, you should also set value to all previous parameters.
# Example: download_with_retries $ANDROID_SDK_URL "." "android_sdk.zip"
local URL="$1"
local DEST="${2:-.}"
local NAME="${3:-${URL##*/}}"
local COMPRESSED="$4"
if [[ $COMPRESSED == "compressed" ]]; then
local COMMAND="curl $URL -4 -sL --compressed -o '$DEST/$NAME' -w '%{http_code}'"
else
local COMMAND="curl $URL -4 -sL -o '$DEST/$NAME' -w '%{http_code}'"
fi
echo "Downloading '$URL' to '${DEST}/${NAME}'..."
retries=20
interval=30
while [ $retries -gt 0 ]; do
((retries--))
# Temporary disable exit on error to retry on non-zero exit code
set +e
http_code=$(eval $COMMAND)
exit_code=$?
if [ $http_code -eq 200 ] && [ $exit_code -eq 0 ]; then
echo "Download completed"
return 0
else
echo "Error — Either HTTP response code for '$URL' is wrong - '$http_code' or exit code is not 0 - '$exit_code'. Waiting $interval seconds before the next attempt, $retries attempts left"
sleep 30
fi
# Enable exit on error back
set -e
done
echo "Could not download $URL"
return 1
}
# Download and install Google Chrome
CHROME_DEB_URL="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
CHROME_DEB_NAME="google-chrome-stable_current_amd64.deb"
download_with_retries $CHROME_DEB_URL "/tmp" "${CHROME_DEB_NAME}"
sudo apt install "/tmp/${CHROME_DEB_NAME}" -f
CHROME_VERSION=$(google-chrome --product-version)
CHROME_VERSION=${CHROME_VERSION%.*}
# Determine latest release of chromedriver
# Compatibility of Google Chrome and Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/downloads/version-selection
LATEST_CHROMEDRIVER_VERSION=$(curl "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION")
# Download and unpack latest release of chromedriver
echo "Downloading chromedriver v$LATEST_CHROMEDRIVER_VERSION..."
wget "https://chromedriver.storage.googleapis.com/$LATEST_CHROMEDRIVER_VERSION/chromedriver_linux64.zip"
unzip chromedriver_linux64.zip
rm chromedriver_linux64.zip
CHROMEDRIVER_DIR="/usr/local/share/chrome_driver"
CHROMEDRIVER_BIN="$CHROMEDRIVER_DIR/chromedriver"
sudo rm -rf $CHROMEDRIVER_DIR/*
sudo rm -rf $CHROMEDRIVER_BIN/*
sudo mkdir -p $CHROMEDRIVER_DIR
sudo mv "chromedriver" $CHROMEDRIVER_BIN
sudo chmod +x $CHROMEDRIVER_BIN
chromedriver --version |
thanks a lot |
@malesci the new images with chrome 102 are deployed. |
Tool name
Google Chrome
Tool license
Proprietary freeware, based on open source components.
Add or update?
Desired version
Chrome version 102
Approximate size
No response
Brief description of tool
No response
URL for tool's homepage
No response
Provide a basic test case to validate the tool's functionality.
No response
Virtual environments affected
Can this tool be installed during the build?
No response
Tool installation time in runtime
No response
Are you willing to submit a PR?
No response
The text was updated successfully, but these errors were encountered: