[ci] Remove unused Chromium setup (#4437)

The tasks that used the Cirrus template and shell script to install a specific version of Chromium have been migrated to LUCI, so this is cruft; I forgot to remove it when finishing that migration.

Also combines two setup steps into one template now that they are only used together.
This commit is contained in:
stuartmorgan
2023-07-11 18:47:33 -04:00
committed by GitHub
parent bd5d19113e
commit 6fbc9f9018
2 changed files with 5 additions and 74 deletions

View File

@ -6,23 +6,7 @@ env:
CHANNEL: "master" # Default to master when not explicitly set by a task.
PLUGIN_TOOL_COMMAND: "dart ./script/tool/bin/flutter_plugin_tools.dart"
install_chrome_linux_template: &INSTALL_CHROME_LINUX
env:
CHROME_NO_SANDBOX: true
CHROME_DOWNLOAD_DIR: /tmp/chromium
CHROME_EXECUTABLE: $CHROME_DOWNLOAD_DIR/chrome-linux/chrome
CHROMEDRIVER_EXECUTABLE: $CHROME_DOWNLOAD_DIR/chromedriver/chromedriver
PATH: $PATH:$CHROME_DOWNLOAD_DIR/chrome-linux
install_chromium_script:
# Install a pinned version of Chromium and its corresponding ChromeDriver.
# Setting CHROME_EXECUTABLE above causes this version to be used for tests.
- ./script/install_chromium.sh
tool_setup_template: &TOOL_SETUP_TEMPLATE
tool_setup_script:
- .ci/scripts/prepare_tool.sh
flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE
setup_template: &SETUP_TEMPLATE
upgrade_flutter_script:
# Channels that are part of our normal test matrix use a pinned,
# auto-rolled version to prevent out-of-band CI failures due to changes in
@ -45,13 +29,14 @@ flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE
- fi
# Run doctor to allow auditing of what version of Flutter the run is using.
- flutter doctor -v
<< : *TOOL_SETUP_TEMPLATE
tool_setup_script:
- .ci/scripts/prepare_tool.sh
# Light-workload Linux tasks.
# These use default machines, with fewer CPUs, to reduce pressure on the
# concurrency limits.
task:
<< : *FLUTTER_UPGRADE_TEMPLATE
<< : *SETUP_TEMPLATE
gke_container:
dockerfile: .ci/Dockerfile
builder_image_name: docker-builder-linux # gce vm image
@ -129,7 +114,7 @@ task:
# These use machines with more CPUs and memory, so will reduce parallelization
# for non-credit runs.
task:
<< : *FLUTTER_UPGRADE_TEMPLATE
<< : *SETUP_TEMPLATE
gke_container:
dockerfile: .ci/Dockerfile
builder_image_name: docker-builder-linux # gce vm image

View File

@ -1,54 +0,0 @@
#!/bin/bash
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This script may be run as:
# $ CHROME_DOWNLOAD_DIR=./whatever script/install_chromium.sh
set -e
set -x
# The target directory where chromium is going to be downloaded
: "${CHROME_DOWNLOAD_DIR:=/tmp/chromium}" # Default value for the CHROME_DOWNLOAD_DIR env.
# The build of Chromium used to test web functionality.
#
# Chromium builds can be located here: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/
#
# Check: https://github.com/flutter/engine/blob/master/lib/web_ui/dev/browser_lock.yaml
: "${CHROMIUM_BUILD:=950363}" # Default value for the CHROMIUM_BUILD env.
# Convenience defaults for CHROME_EXECUTABLE and CHROMEDRIVER_EXECUTABLE. These
# two values should be set in the environment from CI, so this script can validate
# that it has completed downloading chrome and driver successfully (and the expected
# files are executable)
: "${CHROME_EXECUTABLE:=$CHROME_DOWNLOAD_DIR/chrome-linux/chrome}"
: "${CHROMEDRIVER_EXECUTABLE:=$CHROME_DOWNLOAD_DIR/chromedriver/chromedriver}"
# The correct ChromeDriver is distributed alongside the chromium build above, as
# `chromedriver_linux64.zip`, so no need to hardcode any extra info about it.
readonly DOWNLOAD_ROOT="https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F${CHROMIUM_BUILD}%2F"
# Install Chromium.
mkdir "$CHROME_DOWNLOAD_DIR"
readonly CHROMIUM_ZIP_FILE="$CHROME_DOWNLOAD_DIR/chromium.zip"
wget --no-verbose "${DOWNLOAD_ROOT}chrome-linux.zip?alt=media" -O "$CHROMIUM_ZIP_FILE"
unzip -q "$CHROMIUM_ZIP_FILE" -d "$CHROME_DOWNLOAD_DIR/"
# Install ChromeDriver.
readonly DRIVER_ZIP_FILE="$CHROME_DOWNLOAD_DIR/chromedriver.zip"
wget --no-verbose "${DOWNLOAD_ROOT}chromedriver_linux64.zip?alt=media" -O "$DRIVER_ZIP_FILE"
unzip -q "$DRIVER_ZIP_FILE" -d "$CHROME_DOWNLOAD_DIR/"
# Rename CHROME_DOWNLOAD_DIR/chromedriver_linux64 to the expected CHROME_DOWNLOAD_DIR/chromedriver
mv -T "$CHROME_DOWNLOAD_DIR/chromedriver_linux64" "$CHROME_DOWNLOAD_DIR/chromedriver"
# Echo info at the end for ease of debugging.
#
# exports from this script cannot be used elsewhere in the .cirrus.yml file.
set +x
echo
echo "$CHROME_EXECUTABLE"
"$CHROME_EXECUTABLE" --version
echo "$CHROMEDRIVER_EXECUTABLE"
"$CHROMEDRIVER_EXECUTABLE" --version
echo