chore(scripts): archive PowerShell scripts superseded by the Python CLI
Move 16 .ps1 files to scripts/archived/ — they have no live caller: - 10 pure shims (New-BuildVM, Remove-BuildVM, Cleanup-OrphanedBuildVMs, Wait-VMReady, Invoke-RemoteBuild, Get-BuildArtifacts, Watch-DiskSpace, Watch-RunnerHealth, Get-CIJobSummary, Invoke-CIJob) that only forwarded to `ci_orchestrator`; the live Gitea composite action now calls `python -m ci_orchestrator job` directly. - 6 Phase-C host tools reimplemented natively in Python (Start-BurnInTest [+ -Linux], Test-CapacityBurnIn → bench; Test-Smoke → smoke run; Validate-HostState → validate host; Set-CIGuestCredential → creds set). Add scripts/archived/README.md mapping each file to its `ci` replacement, and exempt scripts/archived/ from the PSScriptAnalyzer lint job. Kept (still used / not yet ported): Register-CIScheduledTasks, Backup-CITemplate, Invoke-RetentionPolicy, Set-TemplateSharedFolders, Test-CIGuestWinRM, the e2e build harnesses, and all template/ guest provisioning scripts.
This commit is contained in:
@@ -61,6 +61,9 @@ jobs:
|
|||||||
Invoke-ScriptAnalyzer -Path $_ -Recurse -Settings $settings -Severity Error,Warning
|
Invoke-ScriptAnalyzer -Path $_ -Recurse -Settings $settings -Severity Error,Warning
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
# scripts/archived/ holds frozen .ps1 superseded by the Python CLI
|
||||||
|
# (kept for history only) — exempt from lint.
|
||||||
|
$results = $results | Where-Object { $_.ScriptPath -notmatch '[\\/]archived[\\/]' }
|
||||||
|
|
||||||
if ($results) {
|
if ($results) {
|
||||||
$results | Format-Table -AutoSize
|
$results | Format-Table -AutoSize
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# Archived PowerShell scripts
|
||||||
|
|
||||||
|
These `.ps1` files are **frozen** and no longer part of the live pipeline. They
|
||||||
|
are kept for history and reference only. Do not call them and do not extend
|
||||||
|
them — the production entry point is the Python orchestrator (`ci ...` /
|
||||||
|
`python -m ci_orchestrator`).
|
||||||
|
|
||||||
|
They are exempt from PSScriptAnalyzer lint (see `.gitea/workflows/lint.yml`).
|
||||||
|
|
||||||
|
## Why archived
|
||||||
|
|
||||||
|
**Pure shims** — these only forwarded their arguments to the Python CLI. The
|
||||||
|
live Gitea composite action (`.gitea/actions/local-ci-build/action.yml`) now
|
||||||
|
invokes `python -m ci_orchestrator job` directly, so the shims have no caller.
|
||||||
|
|
||||||
|
| Archived shim | Python replacement |
|
||||||
|
|---------------|--------------------|
|
||||||
|
| `Invoke-CIJob.ps1` | `ci job` |
|
||||||
|
| `New-BuildVM.ps1` | `ci vm new` |
|
||||||
|
| `Remove-BuildVM.ps1` | `ci vm remove` |
|
||||||
|
| `Cleanup-OrphanedBuildVMs.ps1` | `ci vm cleanup` |
|
||||||
|
| `Wait-VMReady.ps1` | `ci wait-ready` |
|
||||||
|
| `Invoke-RemoteBuild.ps1` | `ci build run` |
|
||||||
|
| `Get-BuildArtifacts.ps1` | `ci artifacts collect` |
|
||||||
|
| `Watch-DiskSpace.ps1` | `ci monitor disk` |
|
||||||
|
| `Watch-RunnerHealth.ps1` | `ci monitor runner` |
|
||||||
|
| `Get-CIJobSummary.ps1` | `ci report job` |
|
||||||
|
|
||||||
|
**Phase C host tooling** — real PowerShell logic that ran on the Linux host via
|
||||||
|
`pwsh`, now reimplemented natively in Python so the Linux host needs no pwsh.
|
||||||
|
|
||||||
|
| Archived script | Python replacement |
|
||||||
|
|-----------------|--------------------|
|
||||||
|
| `Start-BurnInTest.ps1` | `ci bench run` |
|
||||||
|
| `Start-BurnInTest-Linux.ps1` | `ci bench run` |
|
||||||
|
| `Test-CapacityBurnIn.ps1` | `ci bench run` / `ci bench measure` |
|
||||||
|
| `Test-Smoke.ps1` | `ci smoke run` |
|
||||||
|
| `Validate-HostState.ps1` | `ci validate host` |
|
||||||
|
| `Set-CIGuestCredential.ps1` | `ci creds set` |
|
||||||
Reference in New Issue
Block a user