GeezerVison is showing github.com — Fix amazonlinux install script (#9967) · PowerShell/PowerShell@4967416
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .vsts-ci/install-ps.yml +9-3Lines changed: 9 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -76,16 +76,22 @@ phases: |
76 | 76 | { |
77 | 77 | throw "powershell was not upgraded: $($PSVersionTable.PSVersion)" |
78 | 78 | } |
79 | | - # ignoring this due to https://github.com/PowerShell/PowerShell/issues/9285 |
80 | | - continueOnError: true |
| 79 | + continueOnError: false |
81 | 80 |
|
82 | 81 | # TODO: add sudo to script and use image with sudo |
83 | 82 | - template: templates/install-ps-phase.yml |
84 | 83 | parameters: |
85 | 84 | scriptName: ./tools/install-powershell.sh |
86 | 85 | jobName: InstallPowerShellCentOS |
87 | 86 | pool: Hosted Ubuntu 1604 |
88 | | - container: mcr.microsoft.com/powershell:centos-7 |
| 87 | + container: mcr.microsoft.com/powershell/test-deps:centos-7 |
| 88 | + |
| 89 | +- template: templates/install-ps-phase.yml |
| 90 | + parameters: |
| 91 | + scriptName: ./tools/install-powershell.sh |
| 92 | + jobName: InstallPowerShellDebian9 |
| 93 | + pool: Hosted Ubuntu 1604 |
| 94 | + container: mcr.microsoft.com/powershell/test-deps:debian-9 |
89 | 95 |
|
90 | 96 |
|
91 | 97 | # VSTS could not find pwsh in: |
|
Collapse file
Copy file name to clipboardExpand all lines: tools/installpsh-amazonlinux.sh +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
66 | 66 | elif [ "${OS}" == "Linux" ] ; then |
67 | 67 | if [ -f /etc/redhat-release ] ; then |
68 | 68 | DistroBasedOn='redhat' |
| 69 | + elif [ -f /etc/system-release ] ; then |
| 70 | + DIST=$(sed s/\ release.*// < /etc/system-release) |
| 71 | + if [[ $DIST == *"Amazon Linux"* ]] ; then |
| 72 | + DistroBasedOn='amazonlinux' |
| 73 | + else |
| 74 | + DistroBasedOn='redhat' |
| 75 | + fi |
69 | 76 | elif [ -f /etc/SuSE-release ] ; then |
70 | 77 | DistroBasedOn='suse' |
71 | 78 | elif [ -f /etc/mandrake-release ] ; then |
|
Collapse file
Copy file name to clipboardExpand all lines: tools/installpsh-debian.sh +14-2Lines changed: 14 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
62 | 62 | elif [ "${OS}" == "Linux" ] ; then |
63 | 63 | if [ -f /etc/redhat-release ] ; then |
64 | 64 | DistroBasedOn='redhat' |
| 65 | + elif [ -f /etc/system-release ] ; then |
| 66 | + DIST=$(sed s/\ release.*// < /etc/system-release) |
| 67 | + if [[ $DIST == *"Amazon Linux"* ]] ; then |
| 68 | + DistroBasedOn='amazonlinux' |
| 69 | + else |
| 70 | + DistroBasedOn='redhat' |
| 71 | + fi |
65 | 72 | elif [ -f /etc/SuSE-release ] ; then |
66 | 73 | DistroBasedOn='suse' |
67 | 74 | elif [ -f /etc/mandrake-release ] ; then |
|
104 | 111 |
|
105 | 112 | #Collect any variation details if required for this distro |
106 | 113 | # shellcheck disable=SC1091 |
107 | | -. /etc/lsb-release |
108 | | -DISTRIB_ID=$(lowercase "$DISTRIB_ID") |
| 114 | +if [[ -f /etc/lsb-release ]]; then |
| 115 | + . /etc/lsb-release |
| 116 | + DISTRIB_ID=$(lowercase "$DISTRIB_ID") |
| 117 | +elif [[ -f /etc/debian_version ]]; then |
| 118 | + DISTRIB_ID="debian" |
| 119 | + DISTRIB_RELEASE=$(cat /etc/debian_version) |
| 120 | +fi |
109 | 121 | #END Collect any variation details if required for this distro |
110 | 122 |
|
111 | 123 | #If there are known incompatible versions of this distro, put the test, message and script exit here: |
|
Collapse file
Copy file name to clipboardExpand all lines: tools/installpsh-osx.sh +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
60 | 60 | elif [ "${OS}" == "Linux" ] ; then |
61 | 61 | if [ -f /etc/redhat-release ] ; then |
62 | 62 | DistroBasedOn='redhat' |
| 63 | + elif [ -f /etc/system-release ] ; then |
| 64 | + DIST=$(sed s/\ release.*// < /etc/system-release) |
| 65 | + if [[ $DIST == *"Amazon Linux"* ]] ; then |
| 66 | + DistroBasedOn='amazonlinux' |
| 67 | + else |
| 68 | + DistroBasedOn='redhat' |
| 69 | + fi |
63 | 70 | elif [ -f /etc/SuSE-release ] ; then |
64 | 71 | DistroBasedOn='suse' |
65 | 72 | elif [ -f /etc/mandrake-release ] ; then |
|
Collapse file
Copy file name to clipboardExpand all lines: tools/installpsh-redhat.sh +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
64 | 64 | elif [ "${OS}" == "Linux" ] ; then |
65 | 65 | if [ -f /etc/redhat-release ] ; then |
66 | 66 | DistroBasedOn='redhat' |
| 67 | + elif [ -f /etc/system-release ] ; then |
| 68 | + DIST=$(sed s/\ release.*// < /etc/system-release) |
| 69 | + if [[ $DIST == *"Amazon Linux"* ]] ; then |
| 70 | + DistroBasedOn='amazonlinux' |
| 71 | + else |
| 72 | + DistroBasedOn='redhat' |
| 73 | + fi |
67 | 74 | elif [ -f /etc/SuSE-release ] ; then |
68 | 75 | DistroBasedOn='suse' |
69 | 76 | elif [ -f /etc/mandrake-release ] ; then |
|
Collapse file
Copy file name to clipboardExpand all lines: tools/installpsh-suse.sh +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
64 | 64 | elif [ "${OS}" == "Linux" ] ; then |
65 | 65 | if [ -f /etc/redhat-release ] ; then |
66 | 66 | DistroBasedOn='redhat' |
| 67 | + elif [ -f /etc/system-release ] ; then |
| 68 | + DIST=$(sed s/\ release.*// < /etc/system-release) |
| 69 | + if [[ $DIST == *"Amazon Linux"* ]] ; then |
| 70 | + DistroBasedOn='amazonlinux' |
| 71 | + else |
| 72 | + DistroBasedOn='redhat' |
| 73 | + fi |
67 | 74 | elif [ -f /etc/SuSE-release ] ; then |
68 | 75 | DistroBasedOn='suse' |
69 | 76 | elif [ -f /etc/mandrake-release ] ; then |
|