feat(burn-in): add fake build script for burnin-dummy repo; update default BuildCommand
gitea/burnin-dummy/build.ps1: Fake build script to commit to the burnin-dummy repo. Creates dist\build-info.txt (date, host, pid) after ~30s ping delay. Invoke-RemoteBuild packages dist\ as artifacts.zip. Start-BurnInTest.ps1: Default BuildCommand updated from ping-only delay to build.ps1 invocation. Run with -NoSkipArtifact to exercise the full artifact pipeline.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#Requires -Version 5.1
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Fake build script per il repo burnin-dummy.
|
||||
|
||||
.DESCRIPTION
|
||||
Simula un build reale: attende ~30s (ping), poi scrive un file in dist\.
|
||||
Invoke-RemoteBuild impacchetta dist\ come artifacts.zip al termine.
|
||||
Committare questo file come build.ps1 nella root del repo burnin-dummy.
|
||||
#>
|
||||
|
||||
Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$distDir = Join-Path $PSScriptRoot 'dist'
|
||||
if (-not (Test-Path $distDir)) {
|
||||
New-Item -ItemType Directory -Path $distDir | Out-Null
|
||||
}
|
||||
|
||||
# Simula lavoro di build (~30 s).
|
||||
# ping e' l'unico delay affidabile in contesto cmd/WinRM (Start-Sleep non funziona via cmd /c).
|
||||
Write-Host '[build.ps1] Simulating build work (~30s)...'
|
||||
ping 127.0.0.1 -n 31 | Out-Null
|
||||
|
||||
# Scrive un artifact marker con metadati del run.
|
||||
@"
|
||||
build-ok
|
||||
date=$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')
|
||||
host=$env:COMPUTERNAME
|
||||
pid=$PID
|
||||
"@ | Out-File -FilePath (Join-Path $distDir 'build-info.txt') -Encoding UTF8
|
||||
|
||||
Write-Host "[build.ps1] Artifact written to $distDir"
|
||||
Reference in New Issue
Block a user