mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-04 09:00:55 +08:00
[ubuntu] Rename build scripts (#8866)
* [ubuntu] Rename build scripts * [ubuntu] Change reboot to inline shell * [ubuntu] Move disk space validation to pester tests * [ubuntu] Rename helper and tests files * [ubuntu] Changes to cleanup, post-deployment and r scripts
This commit is contained in:
committed by
GitHub
parent
410fd620be
commit
1bd9214f41
47
images/ubuntu/scripts/build/configure-apt.sh
Normal file
47
images/ubuntu/scripts/build/configure-apt.sh
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash -e
|
||||
################################################################################
|
||||
## File: configure-apt.sh
|
||||
## Desc: Configure apt, install jq and apt-fast packages.
|
||||
################################################################################
|
||||
|
||||
# Stop and disable apt-daily upgrade services;
|
||||
systemctl stop apt-daily.timer
|
||||
systemctl disable apt-daily.timer
|
||||
systemctl disable apt-daily.service
|
||||
systemctl stop apt-daily-upgrade.timer
|
||||
systemctl disable apt-daily-upgrade.timer
|
||||
systemctl disable apt-daily-upgrade.service
|
||||
|
||||
# Enable retry logic for apt up to 10 times
|
||||
echo "APT::Acquire::Retries \"10\";" > /etc/apt/apt.conf.d/80-retries
|
||||
|
||||
# Configure apt to always assume Y
|
||||
echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes
|
||||
|
||||
# APT understands a field called Phased-Update-Percentage which can be used to control the rollout of a new version. It is an integer between 0 and 100.
|
||||
# In case you have multiple systems that you want to receive the same set of updates,
|
||||
# you can set APT::Machine-ID to a UUID such that they all phase the same,
|
||||
# or set APT::Get::Never-Include-Phased-Updates or APT::Get::Always-Include-Phased-Updates to true such that APT will never/always consider phased updates.
|
||||
# apt-cache policy pkgname
|
||||
echo 'APT::Get::Always-Include-Phased-Updates "true";' > /etc/apt/apt.conf.d/99-phased-updates
|
||||
|
||||
# Fix bad proxy and http headers settings
|
||||
cat <<EOF >> /etc/apt/apt.conf.d/99bad_proxy
|
||||
Acquire::http::Pipeline-Depth 0;
|
||||
Acquire::http::No-Cache true;
|
||||
Acquire::BrokenProxy true;
|
||||
EOF
|
||||
|
||||
# Uninstall unattended-upgrades
|
||||
apt-get purge unattended-upgrades
|
||||
|
||||
echo 'APT sources'
|
||||
cat /etc/apt/sources.list
|
||||
|
||||
apt-get update
|
||||
# Install jq
|
||||
apt-get install jq
|
||||
|
||||
# Install apt-fast using quick-install.sh
|
||||
# https://github.com/ilikenwf/apt-fast
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ilikenwf/apt-fast/master/quick-install.sh)"
|
||||
Reference in New Issue
Block a user