Skip to content

Commit

Permalink
[FLINK-30921][ci] Adds mirrors instead of relying on a single source …
Browse files Browse the repository at this point in the history
…for Ubuntu packages

Signed-off-by: Matthias Pohl <matthias.pohl@aiven.io>
  • Loading branch information
XComp committed Mar 30, 2023
1 parent c2541cd commit c9e4fe9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tools/azure-pipelines/e2e-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@ jobs:
echo "Free up disk space"
./tools/azure-pipelines/free_disk_space.sh
# the APT mirrors access is based on a proposal from https://github.com/actions/runner-images/issues/7048#issuecomment-1419426054
echo "Configure APT mirrors"
mirror_file_path="/etc/apt/mirrors.txt"
default_ubuntu_mirror_url="http://azure.archive.ubuntu.com/ubuntu/"
# add Azure's Ubuntu mirror as a top-priority source
echo -e "${default_ubuntu_mirror_url}\tpriority:1" | sudo tee ${mirror_file_path}
# use other mirrors as a fallback option
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append ${mirror_file_path}
sudo sed -i "s~${default_ubuntu_mirror_url}~mirror+file:${mirror_file_path}~" /etc/apt/sources.list
sudo apt-get update
echo "Installing required software"
sudo apt-get install -y bc libapr1
Expand Down

0 comments on commit c9e4fe9

Please sign in to comment.