mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
[Ubuntu] Remove Ubuntu16 related code from the VE repository (#4336)
This commit is contained in:
committed by
GitHub
parent
1f97f5de37
commit
2d46e3f4d9
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
################################################################################
|
||||
## File: ansible.sh
|
||||
## Desc: Installs Ansible
|
||||
################################################################################
|
||||
|
||||
# this script is used only on Ubuntu 16.04
|
||||
# for Ubuntu 18.04 and 20.04 we use pipx ansible-base package
|
||||
# Install latest Ansible
|
||||
add-apt-repository ppa:ansible/ansible
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends ansible
|
||||
|
||||
invoke_tests "Tools" "Ansible"
|
||||
@@ -8,7 +8,7 @@
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
# Install the AWS CLI v1 on Ubuntu16 and Ubuntu18, and AWS CLI v2 on Ubuntu20
|
||||
# Install the AWS CLI v1 Ubuntu18 and AWS CLI v2 on Ubuntu20
|
||||
if isUbuntu20 ; then
|
||||
download_with_retries "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" "/tmp" "awscliv2.zip"
|
||||
unzip -qq /tmp/awscliv2.zip -d /tmp
|
||||
@@ -16,7 +16,7 @@ if isUbuntu20 ; then
|
||||
fi
|
||||
|
||||
# The installation should be run after python3 is installed as aws-cli V1 dropped python2 support
|
||||
if isUbuntu16 || isUbuntu18 ; then
|
||||
if isUbuntu18 ; then
|
||||
download_with_retries "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" "/tmp" "awscli-bundle.zip"
|
||||
unzip -qq /tmp/awscli-bundle.zip -d /tmp
|
||||
python3 /tmp/awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
## Desc: Installs basic command line utilities and dev packages
|
||||
################################################################################
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
common_packages=$(get_toolset_value .apt.common_packages[])
|
||||
cmd_packages=$(get_toolset_value .apt.cmd_packages[])
|
||||
@@ -13,19 +12,4 @@ for package in $common_packages $cmd_packages; do
|
||||
apt-get install -y --no-install-recommends $package
|
||||
done
|
||||
|
||||
# Toolcache Python requires updated libssl-dev, which was previously installed from ppa:ondrej.
|
||||
# The ppa dropped Ubuntu 16 support hence we need to build OpenSSL from source
|
||||
if isUbuntu16; then
|
||||
openSslArchiveName="openssl-1.1.1k.tar.gz"
|
||||
openSslUrl="https://www.openssl.org/source/${openSslArchiveName}"
|
||||
download_with_retries $openSslUrl "/tmp"
|
||||
openSslPath="/tmp/$(basename -s .tar.gz $openSslArchiveName)"
|
||||
mkdir -p "$openSslPath"
|
||||
tar -C "$openSslPath" -xzf "/tmp/${openSslArchiveName}" --strip-components=1 && cd $openSslPath
|
||||
./config --openssldir=/etc/ssl '-Wl,--enable-new-dtags,-rpath,$(LIBRPATH)'
|
||||
make -s
|
||||
make install > /dev/null
|
||||
ln -sf /etc/ssl/bin/openssl /usr/bin/openssl
|
||||
fi
|
||||
|
||||
invoke_tests "Apt"
|
||||
@@ -16,7 +16,7 @@ JAVA_TOOLCACHE_PATH="$AGENT_TOOLSDIRECTORY/Java_Adopt_jdk"
|
||||
wget -qO - "https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public" | apt-key add -
|
||||
add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
|
||||
|
||||
if isUbuntu16 || isUbuntu18 ; then
|
||||
if isUbuntu18 ; then
|
||||
# Install GPG Key for Azul Open JDK. See https://www.azul.com/downloads/azure-only/zulu/
|
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
|
||||
apt-add-repository "deb https://repos.azul.com/azure-only/zulu/apt stable main"
|
||||
@@ -46,12 +46,6 @@ for JAVA_VERSION in ${JAVA_VERSIONS_LIST[@]}; do
|
||||
done
|
||||
|
||||
# Set Default Java version
|
||||
if isUbuntu16; then
|
||||
# issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=825987
|
||||
# stackoverflow: https://askubuntu.com/questions/1187136/update-java-alternatives-only-java-but-not-javac-is-changed
|
||||
sed -i 's/(hl|jre|jdk|plugin|DUMMY) /(hl|jre|jdk|jdkhl|plugin|DUMMY) /g' /usr/sbin/update-java-alternatives
|
||||
fi
|
||||
|
||||
update-java-alternatives -s /usr/lib/jvm/adoptopenjdk-${DEFAULT_JDK_VERSION}-hotspot-amd64
|
||||
|
||||
echo "JAVA_HOME=/usr/lib/jvm/adoptopenjdk-${DEFAULT_JDK_VERSION}-hotspot-amd64" | tee -a /etc/environment
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
################################################################################
|
||||
## File: mercurial.sh
|
||||
## Desc: Installs Mercurial
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
if isUbuntu16 ; then
|
||||
# Install Mercurial from the mercurial-ppa/releases repository for the latest version for Ubuntu16.
|
||||
# https://www.mercurial-scm.org/wiki/Download
|
||||
add-apt-repository ppa:mercurial-ppa/releases -y
|
||||
apt-get update
|
||||
fi
|
||||
|
||||
apt-get install -y --no-install-recommends mercurial
|
||||
|
||||
invoke_tests "Tools" "Mercurial"
|
||||
@@ -16,11 +16,6 @@ if [[ "$image_label" =~ "ubuntu-18" ]]; then
|
||||
releaseUrl="https://github.com/actions/virtual-environments/releases/tag/ubuntu18%2F${image_version}"
|
||||
fi
|
||||
|
||||
if [[ "$image_label" =~ "ubuntu-16" ]]; then
|
||||
software_url="${github_url}/ubuntu16/${image_version}/images/linux/Ubuntu1604-README.md"
|
||||
releaseUrl="https://github.com/actions/virtual-environments/releases/tag/ubuntu16%2F${image_version}"
|
||||
fi
|
||||
|
||||
cat <<EOF > $imagedata_file
|
||||
[
|
||||
{
|
||||
|
||||
@@ -10,31 +10,26 @@ source $HELPER_SCRIPTS/etc-environment.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
# Install Python, Python 3, pip, pip3
|
||||
if isUbuntu16 || isUbuntu18; then
|
||||
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
|
||||
|
||||
if isUbuntu18 || isUbuntu20 ; then
|
||||
# Install pipx
|
||||
# Set pipx custom directory
|
||||
export PIPX_BIN_DIR=/opt/pipx_bin
|
||||
export PIPX_HOME=/opt/pipx
|
||||
|
||||
python3 -m pip install pipx
|
||||
python3 -m pipx ensurepath
|
||||
|
||||
# Update /etc/environment
|
||||
setEtcEnvironmentVariable "PIPX_BIN_DIR" $PIPX_BIN_DIR
|
||||
setEtcEnvironmentVariable "PIPX_HOME" $PIPX_HOME
|
||||
prependEtcEnvironmentPath $PIPX_BIN_DIR
|
||||
|
||||
# Test pipx
|
||||
if ! command -v pipx; then
|
||||
echo "pipx was not installed or not found on PATH"
|
||||
exit 1
|
||||
fi
|
||||
# Install pipx
|
||||
# Set pipx custom directory
|
||||
export PIPX_BIN_DIR=/opt/pipx_bin
|
||||
export PIPX_HOME=/opt/pipx
|
||||
python3 -m pip install pipx
|
||||
python3 -m pipx ensurepath
|
||||
# Update /etc/environment
|
||||
setEtcEnvironmentVariable "PIPX_BIN_DIR" $PIPX_BIN_DIR
|
||||
setEtcEnvironmentVariable "PIPX_HOME" $PIPX_HOME
|
||||
prependEtcEnvironmentPath $PIPX_BIN_DIR
|
||||
# Test pipx
|
||||
if ! command -v pipx; then
|
||||
echo "pipx was not installed or not found on PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Adding this dir to PATH will make installed pip commands are immediately available.
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
## Desc: Installs vcpkg
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
# Set env variable for vcpkg
|
||||
VCPKG_INSTALLATION_ROOT=/usr/local/share/vcpkg
|
||||
echo "VCPKG_INSTALLATION_ROOT=${VCPKG_INSTALLATION_ROOT}" | tee -a /etc/environment
|
||||
@@ -14,19 +11,9 @@ echo "VCPKG_INSTALLATION_ROOT=${VCPKG_INSTALLATION_ROOT}" | tee -a /etc/environm
|
||||
# Install vcpkg
|
||||
git clone --depth=1 https://github.com/Microsoft/vcpkg $VCPKG_INSTALLATION_ROOT
|
||||
|
||||
# vcpkg requires g++ version 7+, yet Ubuntu 16 default is 5.4. Set version 7 as default temporarily
|
||||
if isUbuntu16; then
|
||||
ln -sf g++-7 /usr/bin/g++
|
||||
fi
|
||||
|
||||
$VCPKG_INSTALLATION_ROOT/bootstrap-vcpkg.sh
|
||||
$VCPKG_INSTALLATION_ROOT/vcpkg integrate install
|
||||
chmod 0777 -R $VCPKG_INSTALLATION_ROOT
|
||||
ln -sf $VCPKG_INSTALLATION_ROOT/vcpkg /usr/local/bin
|
||||
|
||||
# Set back g++ 5.4 as default
|
||||
if isUbuntu16; then
|
||||
ln -sf g++-5 /usr/bin/g++
|
||||
fi
|
||||
|
||||
invoke_tests "Tools" "Vcpkg"
|
||||
Reference in New Issue
Block a user