fix(burn-in): create placeholder artifact when build command produces no output dir

Invoke-RemoteBuild.ps1: when BuildCommand succeeds (exit 0) but GuestArtifactSource
(default: dist) does not exist, instead of silently skipping packaging, now creates a
placeholder 'build-ok.txt' in the artifact output dir and zips it. This ensures
Get-BuildArtifacts.ps1 always finds artifacts.zip regardless of whether the build
produced real output files. Correct for burn-in, smoke, and delay-only build commands.

Start-BurnInTest.ps1: revert default BuildCommand to 'ping 127.0.0.1 -n 31 > nul'
(~30s delay, no artifact output) now that the pipeline handles missing dist gracefully.
The previous 'if not exist dist mkdir dist' workaround is no longer needed.
This commit is contained in:
Simone
2026-05-12 21:23:40 +02:00
parent 8595fbaf45
commit e0b45fc71d
2 changed files with 15 additions and 6 deletions
+7 -5
View File
@@ -34,10 +34,12 @@
.PARAMETER BuildCommand
Comando da eseguire nel guest come passo build (eseguito via cmd /c nel guest).
Default: crea la directory dist con un file marker, poi esce 0 — esercita
l'intero pipeline inclusa la fase di packaging e artifact collection.
Usare 'ping 127.0.0.1 -n 121 > nul' per mantenere 4 VM attive ~120s
e osservare la concorrenza senza produrre artifact.
Default: 'ping 127.0.0.1 -n 31 > nul' (attesa ~30s, nessun output reale).
Quando il build command non produce la directory dist, Invoke-RemoteBuild crea
automaticamente un artifact placeholder (build-ok.txt in zip) per permettere
all'intero pipeline di completarsi.
Usare 'ping 127.0.0.1 -n 601 > nul' per mantenere 4 VM attive ~600s
e osservare la concorrenza prolungata.
.PARAMETER RoundTimeoutMinutes
Minuti massimi di attesa per ogni round prima di interrompere i job rimasti.
@@ -46,7 +48,7 @@
param(
[int] $Rounds = 3,
[int] $Parallelism = 4,
[string] $BuildCommand = 'if not exist dist mkdir dist & echo burnin_ok > dist\marker.txt',
[string] $BuildCommand = 'ping 127.0.0.1 -n 31 > nul',
[int] $RoundTimeoutMinutes = 60
)