fix(shims): add Linux fallback for venv Python path in all PS shims
All shims defaulted to F:\CI\python\venv\Scripts\python.exe when CI_VENV_PYTHON was not set. On Linux host this caused instant failure. Now uses $IsWindows (PS 6+ automatic var; absent on PS 5.1 = Windows) to select /opt/ci/venv/bin/python on Linux. Windows paths unchanged. Affects: Invoke-CIJob, Get-BuildArtifacts, Cleanup-OrphanedBuildVMs, New-BuildVM, Remove-BuildVM, Wait-VMReady, Get-CIJobSummary, Invoke-RemoteBuild, Watch-DiskSpace, Watch-RunnerHealth, Set-CIGuestCredential, Test-CIGuestWinRM. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,13 @@ for ($i = 0; $i -lt $args.Count; $i++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$venvPython = $env:CI_VENV_PYTHON
|
$venvPython = $env:CI_VENV_PYTHON
|
||||||
if (-not $venvPython) { $venvPython = 'F:\CI\python\venv\Scripts\python.exe' }
|
if (-not $venvPython) {
|
||||||
|
# $IsWindows exists only on PS 6+; absent on PS 5.1 (always Windows)
|
||||||
|
if ($null -ne $IsWindows -and $IsWindows -eq $false) {
|
||||||
|
$venvPython = '/opt/ci/venv/bin/python'
|
||||||
|
} else {
|
||||||
|
$venvPython = 'F:\CI\python\venv\Scripts\python.exe'
|
||||||
|
}
|
||||||
|
}
|
||||||
& $venvPython -m ci_orchestrator vm cleanup @pyArgs
|
& $venvPython -m ci_orchestrator vm cleanup @pyArgs
|
||||||
exit $LASTEXITCODE
|
exit $LASTEXITCODE
|
||||||
|
|||||||
@@ -57,6 +57,13 @@ if ($Credential) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$venvPython = $env:CI_VENV_PYTHON
|
$venvPython = $env:CI_VENV_PYTHON
|
||||||
if (-not $venvPython) { $venvPython = 'F:\CI\python\venv\Scripts\python.exe' }
|
if (-not $venvPython) {
|
||||||
|
# $IsWindows exists only on PS 6+; absent on PS 5.1 (always Windows)
|
||||||
|
if ($null -ne $IsWindows -and $IsWindows -eq $false) {
|
||||||
|
$venvPython = '/opt/ci/venv/bin/python'
|
||||||
|
} else {
|
||||||
|
$venvPython = 'F:\CI\python\venv\Scripts\python.exe'
|
||||||
|
}
|
||||||
|
}
|
||||||
& $venvPython -m ci_orchestrator artifacts collect @pyArgs
|
& $venvPython -m ci_orchestrator artifacts collect @pyArgs
|
||||||
exit $LASTEXITCODE
|
exit $LASTEXITCODE
|
||||||
|
|||||||
@@ -32,7 +32,14 @@ for ($i = 0; $i -lt $args.Count; $i++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$venvPython = $env:CI_VENV_PYTHON
|
$venvPython = $env:CI_VENV_PYTHON
|
||||||
if (-not $venvPython) { $venvPython = 'F:\CI\python\venv\Scripts\python.exe' }
|
if (-not $venvPython) {
|
||||||
|
# $IsWindows exists only on PS 6+; absent on PS 5.1 (always Windows)
|
||||||
|
if ($null -ne $IsWindows -and $IsWindows -eq $false) {
|
||||||
|
$venvPython = '/opt/ci/venv/bin/python'
|
||||||
|
} else {
|
||||||
|
$venvPython = 'F:\CI\python\venv\Scripts\python.exe'
|
||||||
|
}
|
||||||
|
}
|
||||||
& $venvPython -m ci_orchestrator report job @pyArgs
|
& $venvPython -m ci_orchestrator report job @pyArgs
|
||||||
exit $LASTEXITCODE
|
exit $LASTEXITCODE
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,13 @@ for ($i = 0; $i -lt $args.Count; $i++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$venvPython = $env:CI_VENV_PYTHON
|
$venvPython = $env:CI_VENV_PYTHON
|
||||||
if (-not $venvPython) { $venvPython = 'F:\CI\python\venv\Scripts\python.exe' }
|
if (-not $venvPython) {
|
||||||
|
# $IsWindows exists only on PS 6+; absent on PS 5.1 (always Windows)
|
||||||
|
if ($null -ne $IsWindows -and $IsWindows -eq $false) {
|
||||||
|
$venvPython = '/opt/ci/venv/bin/python'
|
||||||
|
} else {
|
||||||
|
$venvPython = 'F:\CI\python\venv\Scripts\python.exe'
|
||||||
|
}
|
||||||
|
}
|
||||||
& $venvPython -m ci_orchestrator job @pyArgs
|
& $venvPython -m ci_orchestrator job @pyArgs
|
||||||
exit $LASTEXITCODE
|
exit $LASTEXITCODE
|
||||||
|
|||||||
@@ -86,6 +86,13 @@ if ($Credential) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$venvPython = $env:CI_VENV_PYTHON
|
$venvPython = $env:CI_VENV_PYTHON
|
||||||
if (-not $venvPython) { $venvPython = 'F:\CI\python\venv\Scripts\python.exe' }
|
if (-not $venvPython) {
|
||||||
|
# $IsWindows exists only on PS 6+; absent on PS 5.1 (always Windows)
|
||||||
|
if ($null -ne $IsWindows -and $IsWindows -eq $false) {
|
||||||
|
$venvPython = '/opt/ci/venv/bin/python'
|
||||||
|
} else {
|
||||||
|
$venvPython = 'F:\CI\python\venv\Scripts\python.exe'
|
||||||
|
}
|
||||||
|
}
|
||||||
& $venvPython -m ci_orchestrator build run @pyArgs
|
& $venvPython -m ci_orchestrator build run @pyArgs
|
||||||
exit $LASTEXITCODE
|
exit $LASTEXITCODE
|
||||||
|
|||||||
@@ -31,6 +31,13 @@ $pyArgs = @(
|
|||||||
)
|
)
|
||||||
|
|
||||||
$venvPython = $env:CI_VENV_PYTHON
|
$venvPython = $env:CI_VENV_PYTHON
|
||||||
if (-not $venvPython) { $venvPython = 'F:\CI\python\venv\Scripts\python.exe' }
|
if (-not $venvPython) {
|
||||||
|
# $IsWindows exists only on PS 6+; absent on PS 5.1 (always Windows)
|
||||||
|
if ($null -ne $IsWindows -and $IsWindows -eq $false) {
|
||||||
|
$venvPython = '/opt/ci/venv/bin/python'
|
||||||
|
} else {
|
||||||
|
$venvPython = 'F:\CI\python\venv\Scripts\python.exe'
|
||||||
|
}
|
||||||
|
}
|
||||||
& $venvPython -m ci_orchestrator vm new @pyArgs
|
& $venvPython -m ci_orchestrator vm new @pyArgs
|
||||||
exit $LASTEXITCODE
|
exit $LASTEXITCODE
|
||||||
|
|||||||
@@ -35,6 +35,13 @@ for ($i = 0; $i -lt $args.Count; $i++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$venvPython = $env:CI_VENV_PYTHON
|
$venvPython = $env:CI_VENV_PYTHON
|
||||||
if (-not $venvPython) { $venvPython = 'F:\CI\python\venv\Scripts\python.exe' }
|
if (-not $venvPython) {
|
||||||
|
# $IsWindows exists only on PS 6+; absent on PS 5.1 (always Windows)
|
||||||
|
if ($null -ne $IsWindows -and $IsWindows -eq $false) {
|
||||||
|
$venvPython = '/opt/ci/venv/bin/python'
|
||||||
|
} else {
|
||||||
|
$venvPython = 'F:\CI\python\venv\Scripts\python.exe'
|
||||||
|
}
|
||||||
|
}
|
||||||
& $venvPython -m ci_orchestrator vm remove @pyArgs
|
& $venvPython -m ci_orchestrator vm remove @pyArgs
|
||||||
exit $LASTEXITCODE
|
exit $LASTEXITCODE
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ param(
|
|||||||
[System.Security.SecureString] $Password,
|
[System.Security.SecureString] $Password,
|
||||||
|
|
||||||
[string] $VenvPython = $(if ($env:CI_VENV_PYTHON) { $env:CI_VENV_PYTHON }
|
[string] $VenvPython = $(if ($env:CI_VENV_PYTHON) { $env:CI_VENV_PYTHON }
|
||||||
|
elseif ($null -ne $IsWindows -and $IsWindows -eq $false) { '/opt/ci/venv/bin/python' }
|
||||||
else { 'F:\CI\python\venv\Scripts\python.exe' }),
|
else { 'F:\CI\python\venv\Scripts\python.exe' }),
|
||||||
|
|
||||||
[switch] $SkipVerify
|
[switch] $SkipVerify
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ param(
|
|||||||
[string[]] $AuthOrder = @('ntlm', 'negotiate'),
|
[string[]] $AuthOrder = @('ntlm', 'negotiate'),
|
||||||
|
|
||||||
[string] $VenvPython = $(if ($env:CI_VENV_PYTHON) { $env:CI_VENV_PYTHON }
|
[string] $VenvPython = $(if ($env:CI_VENV_PYTHON) { $env:CI_VENV_PYTHON }
|
||||||
|
elseif ($null -ne $IsWindows -and $IsWindows -eq $false) { '/opt/ci/venv/bin/python' }
|
||||||
else { 'F:\CI\python\venv\Scripts\python.exe' }),
|
else { 'F:\CI\python\venv\Scripts\python.exe' }),
|
||||||
|
|
||||||
[ValidateRange(5, 300)]
|
[ValidateRange(5, 300)]
|
||||||
|
|||||||
@@ -32,6 +32,13 @@ for ($i = 0; $i -lt $args.Count; $i++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$venvPython = $env:CI_VENV_PYTHON
|
$venvPython = $env:CI_VENV_PYTHON
|
||||||
if (-not $venvPython) { $venvPython = 'F:\CI\python\venv\Scripts\python.exe' }
|
if (-not $venvPython) {
|
||||||
|
# $IsWindows exists only on PS 6+; absent on PS 5.1 (always Windows)
|
||||||
|
if ($null -ne $IsWindows -and $IsWindows -eq $false) {
|
||||||
|
$venvPython = '/opt/ci/venv/bin/python'
|
||||||
|
} else {
|
||||||
|
$venvPython = 'F:\CI\python\venv\Scripts\python.exe'
|
||||||
|
}
|
||||||
|
}
|
||||||
& $venvPython -m ci_orchestrator wait-ready @pyArgs
|
& $venvPython -m ci_orchestrator wait-ready @pyArgs
|
||||||
exit $LASTEXITCODE
|
exit $LASTEXITCODE
|
||||||
|
|||||||
@@ -32,6 +32,13 @@ for ($i = 0; $i -lt $args.Count; $i++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$venvPython = $env:CI_VENV_PYTHON
|
$venvPython = $env:CI_VENV_PYTHON
|
||||||
if (-not $venvPython) { $venvPython = 'F:\CI\python\venv\Scripts\python.exe' }
|
if (-not $venvPython) {
|
||||||
|
# $IsWindows exists only on PS 6+; absent on PS 5.1 (always Windows)
|
||||||
|
if ($null -ne $IsWindows -and $IsWindows -eq $false) {
|
||||||
|
$venvPython = '/opt/ci/venv/bin/python'
|
||||||
|
} else {
|
||||||
|
$venvPython = 'F:\CI\python\venv\Scripts\python.exe'
|
||||||
|
}
|
||||||
|
}
|
||||||
& $venvPython -m ci_orchestrator monitor disk @pyArgs
|
& $venvPython -m ci_orchestrator monitor disk @pyArgs
|
||||||
exit $LASTEXITCODE
|
exit $LASTEXITCODE
|
||||||
|
|||||||
@@ -32,6 +32,13 @@ for ($i = 0; $i -lt $args.Count; $i++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$venvPython = $env:CI_VENV_PYTHON
|
$venvPython = $env:CI_VENV_PYTHON
|
||||||
if (-not $venvPython) { $venvPython = 'F:\CI\python\venv\Scripts\python.exe' }
|
if (-not $venvPython) {
|
||||||
|
# $IsWindows exists only on PS 6+; absent on PS 5.1 (always Windows)
|
||||||
|
if ($null -ne $IsWindows -and $IsWindows -eq $false) {
|
||||||
|
$venvPython = '/opt/ci/venv/bin/python'
|
||||||
|
} else {
|
||||||
|
$venvPython = 'F:\CI\python\venv\Scripts\python.exe'
|
||||||
|
}
|
||||||
|
}
|
||||||
& $venvPython -m ci_orchestrator monitor runner @pyArgs
|
& $venvPython -m ci_orchestrator monitor runner @pyArgs
|
||||||
exit $LASTEXITCODE
|
exit $LASTEXITCODE
|
||||||
|
|||||||
Reference in New Issue
Block a user