mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-24 10:28:10 +08:00
Cleanup ubuntu1804 image references (#7388)
This commit is contained in:
committed by
GitHub
parent
425daf97b4
commit
e72606ffb6
@@ -45,30 +45,25 @@ mkdir -p ${ANDROID_SDK_ROOT}
|
||||
|
||||
cmdlineTools="android-cmdline-tools.zip"
|
||||
|
||||
if isUbuntu18; then
|
||||
# Newer command-line-tools require Java 11 which is not default on ubuntu-18.04
|
||||
download_with_retries "https://dl.google.com/android/repository/commandlinetools-linux-9123335_latest.zip" "." $cmdlineTools
|
||||
else
|
||||
# Download the latest command line tools so that we can accept all of the licenses.
|
||||
# See https://developer.android.com/studio/#command-tools
|
||||
cmdlineToolsVersion=$(get_toolset_value '.android."cmdline-tools"')
|
||||
if [[ $cmdlineToolsVersion == "latest" ]]; then
|
||||
repositoryXmlUrl="https://dl.google.com/android/repository/repository2-1.xml"
|
||||
download_with_retries $repositoryXmlUrl "/tmp" "repository2-1.xml"
|
||||
cmdlineToolsVersion=$(
|
||||
yq -p=xml \
|
||||
'.sdk-repository.remotePackage[] | select(."+@path" == "cmdline-tools;latest" and .channelRef."+@ref" == "channel-0").archives.archive[].complete.url | select(contains("commandlinetools-linux"))' \
|
||||
/tmp/repository2-1.xml
|
||||
)
|
||||
# Download the latest command line tools so that we can accept all of the licenses.
|
||||
# See https://developer.android.com/studio/#command-tools
|
||||
cmdlineToolsVersion=$(get_toolset_value '.android."cmdline-tools"')
|
||||
if [[ $cmdlineToolsVersion == "latest" ]]; then
|
||||
repositoryXmlUrl="https://dl.google.com/android/repository/repository2-1.xml"
|
||||
download_with_retries $repositoryXmlUrl "/tmp" "repository2-1.xml"
|
||||
cmdlineToolsVersion=$(
|
||||
yq -p=xml \
|
||||
'.sdk-repository.remotePackage[] | select(."+@path" == "cmdline-tools;latest" and .channelRef."+@ref" == "channel-0").archives.archive[].complete.url | select(contains("commandlinetools-linux"))' \
|
||||
/tmp/repository2-1.xml
|
||||
)
|
||||
|
||||
if [[ -z $cmdlineToolsVersion ]]; then
|
||||
echo "Failed to parse latest command-line tools version"
|
||||
exit 1
|
||||
fi
|
||||
if [[ -z $cmdlineToolsVersion ]]; then
|
||||
echo "Failed to parse latest command-line tools version"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
download_with_retries "https://dl.google.com/android/repository/${cmdlineToolsVersion}" "." $cmdlineTools
|
||||
fi
|
||||
|
||||
unzip -qq $cmdlineTools -d ${ANDROID_SDK_ROOT}/cmdline-tools
|
||||
# Command line tools need to be placed in ${ANDROID_SDK_ROOT}/sdk/cmdline-tools/latest to determine SDK root
|
||||
|
||||
@@ -9,7 +9,7 @@ source $HELPER_SCRIPTS/os.sh
|
||||
install_packages=(podman buildah skopeo)
|
||||
|
||||
# Packages is available in the official Ubuntu upstream starting from Ubuntu 21
|
||||
if isUbuntu18 || isUbuntu20; then
|
||||
if isUbuntu20; then
|
||||
REPO_URL="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable"
|
||||
source /etc/os-release
|
||||
sh -c "echo 'deb ${REPO_URL}/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
|
||||
@@ -23,7 +23,7 @@ apt-get -y install ${install_packages[@]}
|
||||
mkdir -p /etc/containers
|
||||
echo -e "[registries.search]\nregistries = ['docker.io', 'quay.io']" | tee /etc/containers/registries.conf
|
||||
|
||||
if isUbuntu18 || isUbuntu20; then
|
||||
if isUbuntu20; then
|
||||
# Remove source repo
|
||||
rm /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
|
||||
# Document source repo
|
||||
|
||||
@@ -20,15 +20,9 @@ apt-get update
|
||||
apt-get install --no-install-recommends esl-erlang || true
|
||||
|
||||
# Downoloading and installing a deb file manually, ignore deptree errors
|
||||
if isUbuntu18; then
|
||||
esl_url="https://packages.erlang-solutions.com/ubuntu/pool/esl-erlang_25.2.3-1~ubuntu~bionic_amd64.deb"
|
||||
download_with_retries $esl_url "/tmp"
|
||||
dpkg -i /tmp/esl-erlang_25.2.3-1~ubuntu~bionic_amd64.deb || true
|
||||
else
|
||||
esl_url="https://packages.erlang-solutions.com/ubuntu/pool/esl-erlang_25.2.3-2~ubuntu~focal_amd64.deb"
|
||||
download_with_retries $esl_url "/tmp"
|
||||
dpkg -i /tmp/esl-erlang_25.2.3-2~ubuntu~focal_amd64.deb || true
|
||||
fi
|
||||
esl_url="https://packages.erlang-solutions.com/ubuntu/pool/esl-erlang_25.2.3-2~ubuntu~focal_amd64.deb"
|
||||
download_with_retries $esl_url "/tmp"
|
||||
dpkg -i /tmp/esl-erlang_25.2.3-2~ubuntu~focal_amd64.deb || true
|
||||
|
||||
# Restore a proper deptree which brings esl-erlang back in the loop
|
||||
# but eleminate unwanted X.org dependencies
|
||||
|
||||
@@ -41,7 +41,7 @@ enableRepositories() {
|
||||
|
||||
osLabel=$(getOSVersionLabel)
|
||||
|
||||
if isUbuntu18 || isUbuntu20; then
|
||||
if isUbuntu20; then
|
||||
# Add Adopt PPA
|
||||
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | gpg --dearmor > /usr/share/keyrings/adopt.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/adopt.gpg] https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ $osLabel main" > /etc/apt/sources.list.d/adopt.list
|
||||
@@ -52,11 +52,6 @@ osLabel=$(getOSVersionLabel)
|
||||
wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor > /usr/share/keyrings/adoptium.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/adoptium.gpg] https://packages.adoptium.net/artifactory/deb/ $osLabel main" > /etc/apt/sources.list.d/adoptium.list
|
||||
|
||||
if isUbuntu18 ; then
|
||||
# Install GPG Key for Azul Open JDK. See https://www.azul.com/downloads/azure-only/zulu/
|
||||
wget -qO - https://www.azul.com/wp-content/uploads/2021/05/0xB1998361219BD9C9.txt | gpg --dearmor > /usr/share/keyrings/zulu.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/zulu.gpg] https://repos.azul.com/azure-only/zulu/apt stable main" > /etc/apt/sources.list.d/zulu.list
|
||||
fi
|
||||
}
|
||||
|
||||
installOpenJDK() {
|
||||
@@ -127,11 +122,6 @@ for jdkVendor in ${jdkVendors[@]}; do
|
||||
done
|
||||
done
|
||||
|
||||
# Adopt 12 is only available for Ubuntu 18.04
|
||||
if isUbuntu18; then
|
||||
createJavaEnvironmentalVariable "12" "Adopt"
|
||||
fi
|
||||
|
||||
# Install Ant
|
||||
apt-get install -y --no-install-recommends ant ant-optional
|
||||
echo "ANT_HOME=/usr/share/ant" | tee -a /etc/environment
|
||||
|
||||
@@ -11,7 +11,7 @@ source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
# add repository for old Ubuntu images
|
||||
# details in thread: https://github.com/actions/runner-images/issues/6331
|
||||
if isUbuntu18 || isUbuntu20; then
|
||||
if isUbuntu20; then
|
||||
apt-add-repository ppa:ondrej/php -y
|
||||
apt-get update
|
||||
fi
|
||||
|
||||
@@ -10,10 +10,6 @@ source $HELPER_SCRIPTS/etc-environment.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
# Install Python, Python 3, pip, pip3
|
||||
if isUbuntu18; then
|
||||
apt-get install -y --no-install-recommends python python-dev python-pip
|
||||
fi
|
||||
|
||||
apt-get install -y --no-install-recommends python3 python3-dev python3-pip python3-venv
|
||||
|
||||
# Install pipx
|
||||
|
||||
Reference in New Issue
Block a user