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"
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
param(
|
param(
|
||||||
[int] $Rounds = 3,
|
[int] $Rounds = 3,
|
||||||
[int] $Parallelism = 4,
|
[int] $Parallelism = 4,
|
||||||
[string] $BuildCommand = 'ping 127.0.0.1 -n 31 > nul',
|
[string] $BuildCommand = 'powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File build.ps1',
|
||||||
[switch] $NoSkipArtifact,
|
[switch] $NoSkipArtifact,
|
||||||
[int] $RoundTimeoutMinutes = 60
|
[int] $RoundTimeoutMinutes = 60
|
||||||
)
|
)
|
||||||
@@ -59,7 +59,7 @@ $ErrorActionPreference = 'Stop'
|
|||||||
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||||
|
|
||||||
$burnInParams = @{
|
$burnInParams = @{
|
||||||
RepoUrl = 'http://10.10.20.11:3100/ci/burnin-dummy.git'
|
RepoUrl = 'https://gitea.emulab.it/Simone/burnin-dummy.git'
|
||||||
Branch = 'main'
|
Branch = 'main'
|
||||||
TemplatePath = 'F:\CI\Templates\WinBuild2025\WinBuild2025.vmx'
|
TemplatePath = 'F:\CI\Templates\WinBuild2025\WinBuild2025.vmx'
|
||||||
SnapshotName = 'BaseClean'
|
SnapshotName = 'BaseClean'
|
||||||
|
|||||||
Reference in New Issue
Block a user