Cleanup ubuntu1804 image references (#7388)

This commit is contained in:
Shamil Mubarakshin
2023-04-04 12:36:53 +02:00
committed by GitHub
parent 425daf97b4
commit e72606ffb6
23 changed files with 40 additions and 1259 deletions

View File

@@ -15,9 +15,6 @@ function Get-SqliteVersion {
function Get-MySQLVersion {
$mySQLVersion = mysqld --version | Take-OutputPart -Part 2
if (Test-IsUbuntu18) {
$mySQLVersion = $mySQLVersion | Take-OutputPart -Part 0 -Delimiter "-"
}
return $mySQLVersion
}

View File

@@ -40,7 +40,7 @@ $languageAndRuntime.AddToolVersionsListInline("Clang", $(Get-ClangToolVersions -
$languageAndRuntime.AddToolVersionsListInline("Clang-format", $(Get-ClangToolVersions -ToolName "clang-format"), "^\d+")
$languageAndRuntime.AddToolVersionsListInline("Clang-tidy", $(Get-ClangTidyVersions), "^\d+")
$languageAndRuntime.AddToolVersion("Dash", $(Get-DashVersion))
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
if (Test-IsUbuntu20) {
$languageAndRuntime.AddToolVersion("Erlang", $(Get-ErlangVersion))
$languageAndRuntime.AddToolVersion("Erlang rebar3", $(Get-ErlangRebar3Version))
}
@@ -81,7 +81,7 @@ to accomplish this.
# Project Management
$projectManagement = $installedSoftware.AddHeader("Project Management")
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
if (Test-IsUbuntu20) {
$projectManagement.AddToolVersion("Ant", $(Get-AntVersion))
$projectManagement.AddToolVersion("Gradle", $(Get-GradleVersion))
}
@@ -89,7 +89,7 @@ if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
$projectManagement.AddToolVersion("Lerna", $(Get-LernaVersion))
}
$projectManagement.AddToolVersion("Maven", $(Get-MavenVersion))
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
if (Test-IsUbuntu20) {
$projectManagement.AddToolVersion("Sbt", $(Get-SbtVersion))
}
@@ -118,7 +118,7 @@ $tools.AddToolVersion("Git LFS", $(Get-GitLFSVersion))
$tools.AddToolVersion("Git-ftp", $(Get-GitFTPVersion))
$tools.AddToolVersion("Haveged", $(Get-HavegedVersion))
$tools.AddToolVersion("Heroku", $(Get-HerokuVersion))
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
if (Test-IsUbuntu20) {
$tools.AddToolVersion("HHVM (HipHop VM)", $(Get-HHVMVersion))
}
$tools.AddToolVersion("jq", $(Get-JqVersion))
@@ -135,7 +135,7 @@ $tools.AddToolVersion("nvm", $(Get-NvmVersion))
$tools.AddToolVersion("OpenSSL", $(Get-OpensslVersion))
$tools.AddToolVersion("Packer", $(Get-PackerVersion))
$tools.AddToolVersion("Parcel", $(Get-ParcelVersion))
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
if (Test-IsUbuntu20) {
$tools.AddToolVersion("PhantomJS", $(Get-PhantomJSVersion))
}
$tools.AddToolVersion("Podman", $(Get-PodManVersion))
@@ -213,7 +213,7 @@ $netCoreTools.AddToolVersionsListInline(".NET Core SDK", $(Get-DotNetCoreSdkVers
$netCoreTools.AddNodes($(Get-DotnetTools))
$databasesTools = $installedSoftware.AddHeader("Databases")
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
if (Test-IsUbuntu20) {
$databasesTools.AddToolVersion("MongoDB", $(Get-MongoDbVersion))
}
$databasesTools.AddToolVersion("sqlite3", $(Get-SqliteVersion))

View File

@@ -42,10 +42,6 @@ function Get-KernelVersion {
return $kernelVersion
}
function Test-IsUbuntu18 {
return (lsb_release -rs) -eq "18.04"
}
function Test-IsUbuntu20 {
return (lsb_release -rs) -eq "20.04"
}

View File

@@ -4,11 +4,6 @@
## Desc: Helper functions for installing tools
################################################################################
function isUbuntu18
{
lsb_release -d | grep -q 'Ubuntu 18'
}
function isUbuntu20
{
lsb_release -d | grep -q 'Ubuntu 20'

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -331,7 +331,7 @@ Describe "Phantomjs" -Skip:(Test-IsUbuntu22) {
}
}
Describe "GraalVM" -Skip:(Test-IsUbuntu18) {
Describe "GraalVM" {
It "graalvm" {
'$GRAALVM_11_ROOT/bin/java -version' | Should -ReturnZeroExitCode
}