Fix amazonlinux install script (#9967)
This commit is contained in:
parent
825399617b
commit
4967416067
@ -76,8 +76,7 @@ phases:
|
||||
{
|
||||
throw "powershell was not upgraded: $($PSVersionTable.PSVersion)"
|
||||
}
|
||||
# ignoring this due to https://github.com/PowerShell/PowerShell/issues/9285
|
||||
continueOnError: true
|
||||
continueOnError: false
|
||||
|
||||
# TODO: add sudo to script and use image with sudo
|
||||
- template: templates/install-ps-phase.yml
|
||||
@ -85,7 +84,14 @@ phases:
|
||||
scriptName: ./tools/install-powershell.sh
|
||||
jobName: InstallPowerShellCentOS
|
||||
pool: Hosted Ubuntu 1604
|
||||
container: mcr.microsoft.com/powershell:centos-7
|
||||
container: mcr.microsoft.com/powershell/test-deps:centos-7
|
||||
|
||||
- template: templates/install-ps-phase.yml
|
||||
parameters:
|
||||
scriptName: ./tools/install-powershell.sh
|
||||
jobName: InstallPowerShellDebian9
|
||||
pool: Hosted Ubuntu 1604
|
||||
container: mcr.microsoft.com/powershell/test-deps:debian-9
|
||||
|
||||
|
||||
# VSTS could not find pwsh in:
|
||||
|
@ -66,6 +66,13 @@ else
|
||||
elif [ "${OS}" == "Linux" ] ; then
|
||||
if [ -f /etc/redhat-release ] ; then
|
||||
DistroBasedOn='redhat'
|
||||
elif [ -f /etc/system-release ] ; then
|
||||
DIST=$(sed s/\ release.*// < /etc/system-release)
|
||||
if [[ $DIST == *"Amazon Linux"* ]] ; then
|
||||
DistroBasedOn='amazonlinux'
|
||||
else
|
||||
DistroBasedOn='redhat'
|
||||
fi
|
||||
elif [ -f /etc/SuSE-release ] ; then
|
||||
DistroBasedOn='suse'
|
||||
elif [ -f /etc/mandrake-release ] ; then
|
||||
|
@ -62,6 +62,13 @@ else
|
||||
elif [ "${OS}" == "Linux" ] ; then
|
||||
if [ -f /etc/redhat-release ] ; then
|
||||
DistroBasedOn='redhat'
|
||||
elif [ -f /etc/system-release ] ; then
|
||||
DIST=$(sed s/\ release.*// < /etc/system-release)
|
||||
if [[ $DIST == *"Amazon Linux"* ]] ; then
|
||||
DistroBasedOn='amazonlinux'
|
||||
else
|
||||
DistroBasedOn='redhat'
|
||||
fi
|
||||
elif [ -f /etc/SuSE-release ] ; then
|
||||
DistroBasedOn='suse'
|
||||
elif [ -f /etc/mandrake-release ] ; then
|
||||
@ -104,8 +111,13 @@ fi
|
||||
|
||||
#Collect any variation details if required for this distro
|
||||
# shellcheck disable=SC1091
|
||||
. /etc/lsb-release
|
||||
DISTRIB_ID=$(lowercase "$DISTRIB_ID")
|
||||
if [[ -f /etc/lsb-release ]]; then
|
||||
. /etc/lsb-release
|
||||
DISTRIB_ID=$(lowercase "$DISTRIB_ID")
|
||||
elif [[ -f /etc/debian_version ]]; then
|
||||
DISTRIB_ID="debian"
|
||||
DISTRIB_RELEASE=$(cat /etc/debian_version)
|
||||
fi
|
||||
#END Collect any variation details if required for this distro
|
||||
|
||||
#If there are known incompatible versions of this distro, put the test, message and script exit here:
|
||||
|
@ -60,6 +60,13 @@ else
|
||||
elif [ "${OS}" == "Linux" ] ; then
|
||||
if [ -f /etc/redhat-release ] ; then
|
||||
DistroBasedOn='redhat'
|
||||
elif [ -f /etc/system-release ] ; then
|
||||
DIST=$(sed s/\ release.*// < /etc/system-release)
|
||||
if [[ $DIST == *"Amazon Linux"* ]] ; then
|
||||
DistroBasedOn='amazonlinux'
|
||||
else
|
||||
DistroBasedOn='redhat'
|
||||
fi
|
||||
elif [ -f /etc/SuSE-release ] ; then
|
||||
DistroBasedOn='suse'
|
||||
elif [ -f /etc/mandrake-release ] ; then
|
||||
|
@ -64,6 +64,13 @@ else
|
||||
elif [ "${OS}" == "Linux" ] ; then
|
||||
if [ -f /etc/redhat-release ] ; then
|
||||
DistroBasedOn='redhat'
|
||||
elif [ -f /etc/system-release ] ; then
|
||||
DIST=$(sed s/\ release.*// < /etc/system-release)
|
||||
if [[ $DIST == *"Amazon Linux"* ]] ; then
|
||||
DistroBasedOn='amazonlinux'
|
||||
else
|
||||
DistroBasedOn='redhat'
|
||||
fi
|
||||
elif [ -f /etc/SuSE-release ] ; then
|
||||
DistroBasedOn='suse'
|
||||
elif [ -f /etc/mandrake-release ] ; then
|
||||
|
@ -64,6 +64,13 @@ else
|
||||
elif [ "${OS}" == "Linux" ] ; then
|
||||
if [ -f /etc/redhat-release ] ; then
|
||||
DistroBasedOn='redhat'
|
||||
elif [ -f /etc/system-release ] ; then
|
||||
DIST=$(sed s/\ release.*// < /etc/system-release)
|
||||
if [[ $DIST == *"Amazon Linux"* ]] ; then
|
||||
DistroBasedOn='amazonlinux'
|
||||
else
|
||||
DistroBasedOn='redhat'
|
||||
fi
|
||||
elif [ -f /etc/SuSE-release ] ; then
|
||||
DistroBasedOn='suse'
|
||||
elif [ -f /etc/mandrake-release ] ; then
|
||||
|
Loading…
Reference in New Issue
Block a user