diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a0aa5c796..aa79529bf 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -61,13 +61,10 @@ jobs: - name: Install dependencies run: | - # Use faster mirrors and install with timeout sudo rm -f /etc/apt/sources.list.d/azure-cli.list /etc/apt/sources.list.d/microsoft-prod.list - echo "deb http://azure.archive.ubuntu.com/ubuntu/ $(lsb_release -cs) main restricted universe multiverse" | sudo tee /etc/apt/sources.list - echo "deb http://azure.archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list - - sudo apt-get update --fix-missing - sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends fuse + # Same helper the e2e image installs through: the runner's own list is + # azure-only too, and an outage there fails this step outright. + sudo docker/apt-install fuse # Verify FUSE installation echo "FUSE version: $(fusermount --version 2>&1 || echo 'fusermount not found')" diff --git a/docker/apt-install b/docker/apt-install index f534a4e9f..8dfd999d3 100755 --- a/docker/apt-install +++ b/docker/apt-install @@ -8,7 +8,9 @@ set -e [ -f /etc/apt/sources.list.orig ] || cp /etc/apt/sources.list /etc/apt/sources.list.orig for mirror in azure.archive.ubuntu.com archive.ubuntu.com; do - sed "s|http://archive\.ubuntu\.com/ubuntu|http://$mirror/ubuntu|g; s|http://security\.ubuntu\.com/ubuntu|http://$mirror/ubuntu|g" \ + # Any archive host, so this works whether the pristine list came from the + # base image (archive.ubuntu.com) or a CI runner (azure.archive.ubuntu.com). + sed "s|http://[a-z0-9.]*archive\.ubuntu\.com/ubuntu|http://$mirror/ubuntu|g; s|http://security\.ubuntu\.com/ubuntu|http://$mirror/ubuntu|g" \ /etc/apt/sources.list.orig > /etc/apt/sources.list if apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=15 update && \ DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=15 install -y \