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:
@@ -0,0 +1,73 @@
|
||||
#Requires -Version 5.1
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Wrapper di lancio per Test-CapacityBurnIn.ps1 con il template Linux (LinuxBuild2404).
|
||||
|
||||
.DESCRIPTION
|
||||
Esegue il burn-in a 4 job / 3 round contro il repo burnin-dummy su Gitea,
|
||||
usando il template Ubuntu 24.04. Speculare a Start-BurnInTest.ps1 (Windows).
|
||||
|
||||
Prerequisiti:
|
||||
- Repo burnin-dummy su Gitea con build.sh nella root del branch main
|
||||
- Credenziali guest nel Credential Manager target 'BuildVMGuest'
|
||||
(usate per il PAT Gitea; SSH usa chiave F:\CI\keys\ci_linux)
|
||||
- Gitea PAT nel Credential Manager target 'GiteaPAT'
|
||||
New-StoredCredential -Target 'GiteaPAT' -UserName 'ci' -Password '<pat>' -Persist LocalMachine
|
||||
- Template LinuxBuild2404 con snapshot BaseClean-Linux in stato powered-off
|
||||
- VMware Tools attivo nel guest (per auto-detect IP)
|
||||
- build.sh eseguibile (chmod +x) nel repo — oppure viene richiamato via bash
|
||||
|
||||
Esempi di utilizzo:
|
||||
# Run completo (3 round, 4 job paralleli)
|
||||
.\Start-BurnInTest-Linux.ps1
|
||||
|
||||
# Smoke veloce (1 round, 2 job)
|
||||
.\Start-BurnInTest-Linux.ps1 -Rounds 1 -Parallelism 2
|
||||
|
||||
# Build piu' lungo per osservare concorrenza prolungata
|
||||
.\Start-BurnInTest-Linux.ps1 -Rounds 1 -BuildCommand 'sleep 120'
|
||||
|
||||
.PARAMETER Rounds
|
||||
Numero di round sequenziali. Default: 3.
|
||||
|
||||
.PARAMETER Parallelism
|
||||
Job concorrenti per round. Default: 4.
|
||||
|
||||
.PARAMETER BuildCommand
|
||||
Comando da eseguire nel guest come passo build (eseguito via SSH).
|
||||
Default: 'bash build.sh'
|
||||
|
||||
.PARAMETER RoundTimeoutMinutes
|
||||
Minuti massimi di attesa per ogni round prima di interrompere i job rimasti.
|
||||
Default: 60.
|
||||
#>
|
||||
param(
|
||||
[int] $Rounds = 3,
|
||||
[int] $Parallelism = 4,
|
||||
[string] $BuildCommand = 'bash build.sh',
|
||||
[int] $RoundTimeoutMinutes = 60
|
||||
)
|
||||
|
||||
Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$burnInParams = @{
|
||||
RepoUrl = 'http://10.10.20.11:3100/Simone/burnin-dummy.git'
|
||||
Branch = 'main'
|
||||
TemplatePath = '/var/lib/ci/templates/LinuxBuild2404/LinuxBuild2404.vmx'
|
||||
SnapshotName = 'BaseClean-Linux'
|
||||
CloneBaseDir = '/var/lib/ci/build-vms/'
|
||||
ArtifactBaseDir = '/var/lib/ci/artifacts/'
|
||||
GuestCredentialTarget = 'BuildVMGuest'
|
||||
GiteaCredentialTarget = 'GiteaPAT'
|
||||
VmrunPath = '/usr/bin/vmrun'
|
||||
GuestOS = 'Linux'
|
||||
BuildCommand = $BuildCommand
|
||||
Parallelism = $Parallelism
|
||||
Rounds = $Rounds
|
||||
RoundTimeoutMinutes = $RoundTimeoutMinutes
|
||||
}
|
||||
|
||||
& (Join-Path $PSScriptRoot 'Test-CapacityBurnIn.ps1') @burnInParams
|
||||
|
||||
exit $LASTEXITCODE
|
||||
Reference in New Issue
Block a user