fix(ci): retry transient network errors when installing PowerShell
CI / CI configuration security checks (push) Successful in 1s
CI / PowerShell tests on Ubuntu (push) Failing after 12s
CI / Python tests and compilation (push) Successful in 25s
CI / QMD unit tests (push) Successful in 4s
CI / Capabilities and shell quality (push) Successful in 38s
CI / Build and inspect generated packages (push) Successful in 12s
CI / Installed client configuration smoke tests (push) Successful in 1m0s
CI / Bash integration and installation guards (push) Successful in 1m9s
CI / CI configuration security checks (push) Successful in 1s
CI / PowerShell tests on Ubuntu (push) Failing after 12s
CI / Python tests and compilation (push) Successful in 25s
CI / QMD unit tests (push) Successful in 4s
CI / Capabilities and shell quality (push) Successful in 38s
CI / Build and inspect generated packages (push) Successful in 12s
CI / Installed client configuration smoke tests (push) Successful in 1m0s
CI / Bash integration and installation guards (push) Successful in 1m9s
The Microsoft package download failed intermittently with wget exit code 4 and no visible error. Retry host and connection errors, log failures, and retry apt downloads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1d166a62cb
commit
5664fec100
1 file changed
+5
-3
@@ -75,10 +75,12 @@ jobs:
|
||||
if ! command -v pwsh >/dev/null 2>&1; then
|
||||
# Microsoft's signed apt repository; the job fails when PowerShell cannot be installed.
|
||||
. /etc/os-release
|
||||
wget -q -O "$RUNNER_TEMP/packages-microsoft-prod.deb" "https://packages.microsoft.com/config/$ID/$VERSION_ID/packages-microsoft-prod.deb"
|
||||
# Runner DNS fails intermittently (wget exit 4); retry transient network errors and keep them visible.
|
||||
wget -nv --tries=5 --waitretry=10 --retry-connrefused --retry-on-host-error \
|
||||
-O "$RUNNER_TEMP/packages-microsoft-prod.deb" "https://packages.microsoft.com/config/$ID/$VERSION_ID/packages-microsoft-prod.deb"
|
||||
sudo dpkg -i "$RUNNER_TEMP/packages-microsoft-prod.deb"
|
||||
sudo apt-get update
|
||||
sudo apt-get install --yes --no-install-recommends powershell
|
||||
sudo apt-get -o Acquire::Retries=5 update
|
||||
sudo apt-get -o Acquire::Retries=5 install --yes --no-install-recommends powershell
|
||||
fi
|
||||
pwsh -NoLogo -NoProfile -NonInteractive -Command '$PSVersionTable.PSVersion.ToString()'
|
||||
- name: Run PowerShell tests
|
||||
|
||||
Reference in new issue
Block a user