Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .vsts-ci/install-ps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,22 @@ 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
parameters:
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:
Expand Down
7 changes: 7 additions & 0 deletions tools/installpsh-amazonlinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 14 additions & 2 deletions tools/installpsh-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions tools/installpsh-osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions tools/installpsh-redhat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions tools/installpsh-suse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down