mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Merge branch 'master' into add-parallel-on-linux
This commit is contained in:
@@ -10,9 +10,6 @@ source $HELPER_SCRIPTS/apt.sh
|
||||
|
||||
set -e
|
||||
|
||||
echo "Install curl"
|
||||
apt-get install -y --no-install-recommends curl
|
||||
|
||||
echo "Install dnsutils"
|
||||
apt-get install -y --no-install-recommends dnsutils
|
||||
|
||||
@@ -64,6 +61,9 @@ apt-get install -y --no-install-recommends time
|
||||
echo "Install unzip"
|
||||
apt-get install -y --no-install-recommends unzip
|
||||
|
||||
echo "Install upx"
|
||||
apt-get install -y --no-install-recommends upx
|
||||
|
||||
echo "Install wget"
|
||||
apt-get install -y --no-install-recommends wget
|
||||
|
||||
@@ -153,6 +153,7 @@ DocumentInstalledItemIndent "sudo"
|
||||
DocumentInstalledItemIndent "telnet"
|
||||
DocumentInstalledItemIndent "time"
|
||||
DocumentInstalledItemIndent "unzip"
|
||||
DocumentInstalledItemIndent "upx"
|
||||
DocumentInstalledItemIndent "wget"
|
||||
DocumentInstalledItemIndent "zip"
|
||||
DocumentInstalledItemIndent "tzdata"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
source $HELPER_SCRIPTS/apt.sh
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
LATEST_DOTNET_PACKAGE=dotnet-sdk-3.0
|
||||
LATEST_DOTNET_PACKAGES=("dotnet-sdk-3.0" "dotnet-sdk-3.1")
|
||||
|
||||
LSB_RELEASE=$(lsb_release -rs)
|
||||
|
||||
@@ -30,21 +30,23 @@ mksamples()
|
||||
|
||||
set -e
|
||||
|
||||
echo "Determing if .NET Core ($LATEST_DOTNET_PACKAGE) is installed"
|
||||
if ! IsInstalled $LATEST_DOTNET_PACKAGE; then
|
||||
echo "Could not find .NET Core ($LATEST_DOTNET_PACKAGE), installing..."
|
||||
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
|
||||
mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
|
||||
sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-bionic-prod bionic main" > /etc/apt/sources.list.d/dotnetdev.list'
|
||||
apt-get install apt-transport-https
|
||||
apt-get update
|
||||
apt-get install $LATEST_DOTNET_PACKAGE -y
|
||||
else
|
||||
echo ".NET Core ($LATEST_DOTNET_PACKAGE) is already installed"
|
||||
fi
|
||||
for latest_package in ${LATEST_DOTNET_PACKAGES[@]}; do
|
||||
echo "Determing if .NET Core ($latest_package) is installed"
|
||||
if ! IsInstalled $latest_package; then
|
||||
echo "Could not find .NET Core ($latest_package), installing..."
|
||||
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
|
||||
mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
|
||||
sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-bionic-prod bionic main" > /etc/apt/sources.list.d/dotnetdev.list'
|
||||
apt-get install apt-transport-https
|
||||
apt-get update
|
||||
apt-get install $latest_package -y
|
||||
else
|
||||
echo ".NET Core ($latest_package) is already installed"
|
||||
fi
|
||||
done
|
||||
|
||||
# Get list of all released SDKs from channels which are not end-of-life or preview
|
||||
release_urls=("https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.0/releases.json")
|
||||
release_urls=("https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.0/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.1/releases.json")
|
||||
sdks=()
|
||||
for release_url in ${release_urls[@]}; do
|
||||
echo "${release_url}"
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: hosted-tool-cache.sh
|
||||
## Desc: Downloads and installs hosted tools cache
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
# Fail out if any setups fail
|
||||
set -e
|
||||
|
||||
# Download hosted tool cache
|
||||
AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
|
||||
echo "AGENT_TOOLSDIRECTORY=$AGENT_TOOLSDIRECTORY" | tee -a /etc/environment
|
||||
azcopy --recursive \
|
||||
--source https://vstsagenttools.blob.core.windows.net/tools/hostedtoolcache/ubuntu-1804 \
|
||||
--destination $AGENT_TOOLSDIRECTORY
|
||||
|
||||
# Install tools from hosted tool cache
|
||||
original_directory=$PWD
|
||||
setups=$(find $AGENT_TOOLSDIRECTORY -name setup.sh)
|
||||
for setup in $setups; do
|
||||
chmod +x $setup;
|
||||
cd $(dirname $setup);
|
||||
./$(basename $setup);
|
||||
cd $original_directory;
|
||||
done;
|
||||
|
||||
DocumentInstalledItem "Python:"
|
||||
pythons=$(ls $AGENT_TOOLSDIRECTORY/Python)
|
||||
for python in $pythons; do
|
||||
DocumentInstalledItemIndent "Python $python"
|
||||
done;
|
||||
|
||||
# PyPy is also configured using the setup-python action
|
||||
pypys=$(ls $AGENT_TOOLSDIRECTORY/PyPy)
|
||||
for pypy in $pypys; do
|
||||
DocumentInstalledItemIndent "PyPy $pypy"
|
||||
# Add symlinks for pypy2 and pypy3 to usr/local/bin, there should only be 2 versions of PyPy in the tools cache that is downloaded
|
||||
if [ ${pypy:0:1} -eq "3" ] ; then
|
||||
# add pypy 3.X to PATH
|
||||
ln -s $AGENT_TOOLSDIRECTORY/PyPy/$pypy/x64/bin/pypy3 /usr/local/bin/pypy3
|
||||
else
|
||||
# add pypy 2.X to PATH
|
||||
ln -s $AGENT_TOOLSDIRECTORY/PyPy/$pypy/x64/bin/pypy /usr/local/bin/pypy
|
||||
fi
|
||||
done;
|
||||
|
||||
DocumentInstalledItem "Ruby:"
|
||||
rubys=$(ls $AGENT_TOOLSDIRECTORY/Ruby)
|
||||
for ruby in $rubys; do
|
||||
DocumentInstalledItemIndent "Ruby $ruby"
|
||||
done;
|
||||
@@ -7,6 +7,6 @@
|
||||
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
AddTitle "Hosted Ubuntu 1804 Image ($(lsb_release -ds))"
|
||||
WriteItem "The following software is installed on machines in the Hosted Ubuntu 1804 (v$IMAGE_VERSION) pool"
|
||||
AddTitle "$(lsb_release -ds)"
|
||||
WriteItem "The following software is installed on machines with the $IMAGE_VERSION update."
|
||||
WriteItem "***"
|
||||
|
||||
Reference in New Issue
Block a user