diff --git a/scripts/Invoke-CIJob.ps1 b/scripts/Invoke-CIJob.ps1 index 13db7c5..6cd4f63 100644 --- a/scripts/Invoke-CIJob.ps1 +++ b/scripts/Invoke-CIJob.ps1 @@ -105,11 +105,6 @@ param( # Requires Set-TemplateSharedFolders.ps1 to have been run on the template. [switch] $UseSharedCache, - # Skip artifact packaging and collection (Phase 5 packaging + Phase 6). - # Use for burn-in / smoke builds that intentionally produce no output. - # In production (absent) the build must produce artifacts or the job fails. - [switch] $SkipArtifact, - # Credential Manager target for Gitea PAT used by -UseGitClone (private repos). # Store with: New-StoredCredential -Target 'GiteaPAT' -UserName '' -Password '' -Persist LocalMachine # Ignored when -UseGitClone is not set. @@ -499,17 +494,12 @@ try { if ($GuestArtifactSource -ne '') { $remoteBuildParams['GuestArtifactSource'] = $GuestArtifactSource } if ($ExtraGuestEnv.Count -gt 0) { $remoteBuildParams['ExtraGuestEnv'] = $ExtraGuestEnv } if ($UseSharedCache) { $remoteBuildParams['UseSharedCache'] = $true } - if ($SkipArtifact) { $remoteBuildParams['SkipArtifact'] = $true } & "$scriptDir\Invoke-RemoteBuild.ps1" @remoteBuildParams Write-JobEvent -Phase 'phase5.build' -Status 'success' $phaseTimings.Add([PSCustomObject]@{ Phase = 'Phase 5 - Remote build'; Sec = [int]((Get-Date) - $phaseStart).TotalSeconds }) $phaseStart = Get-Date # ── Phase 6: Collect artifacts ──────────────────────────────────────── - if ($SkipArtifact) { - Write-Host "`n[Phase 6/6] Artifact collection skipped (-SkipArtifact)." - Write-JobEvent -Phase 'phase6.artifacts' -Status 'skipped' - } else { Write-Host "`n[Phase 6/6] Collecting artifacts..." Write-JobEvent -Phase 'phase6.artifacts' -Status 'start' if ($GuestOS -eq 'Linux') { @@ -530,8 +520,7 @@ try { -HostArtifactDir $jobArtifactDir ` -IncludeLogs } - Write-JobEvent -Phase 'phase6.artifacts' -Status 'success' -Data @{ dir = $jobArtifactDir } - } + Write-JobEvent -Phase 'phase6.artifacts' -Status 'success' -Data @{ dir = $jobArtifactDir } $elapsed = (Get-Date) - $startTime Write-JobEvent -Phase 'job' -Status 'success' -Data @{ elapsedSec = [int]$elapsed.TotalSeconds } $phaseTimings.Add([PSCustomObject]@{ Phase = 'Phase 6 - Artifacts'; Sec = [int]((Get-Date) - $phaseStart).TotalSeconds }) diff --git a/scripts/Invoke-RemoteBuild.ps1 b/scripts/Invoke-RemoteBuild.ps1 index 048d562..80ee488 100644 --- a/scripts/Invoke-RemoteBuild.ps1 +++ b/scripts/Invoke-RemoteBuild.ps1 @@ -126,12 +126,6 @@ param( # and VMware Tools HGFS driver present in the guest. [switch] $UseSharedCache, - # When set, skip artifact packaging and do NOT write artifacts.zip in the guest. - # Use for burn-in / smoke builds that intentionally produce no output. - # In production (default: absent) the build MUST produce GuestArtifactSource or the - # job fails — a silently-empty build is treated as an error. - [switch] $SkipArtifact, - # Guest OS type — Linux uses SSH instead of WinRM. [ValidateSet('Windows', 'Linux')] [string] $GuestOS = 'Windows', @@ -433,7 +427,7 @@ try { # ── Custom build command (e.g. python, msbuild, cmake…) ────────── Write-Host "[Invoke-RemoteBuild] Running build command: $BuildCommand" $buildExit = Invoke-Command -Session $session -ScriptBlock { - param($workDir, $cmd, $artifactZip, $artifactSrc, $useCache, $extraEnv, $skipArt) + param($workDir, $cmd, $artifactZip, $artifactSrc, $useCache, $extraEnv) # Unbuffered Python output — lines appear in real-time instead of being held in buffer $env:PYTHONUNBUFFERED = '1' if ($useCache) { @@ -448,14 +442,14 @@ try { & cmd /c "$cmd 2>&1" | ForEach-Object { Write-Host $_ } $exit = $LASTEXITCODE - if ($exit -eq 0 -and -not $skipArt) { + if ($exit -eq 0) { $archiveDir = Split-Path $artifactZip -Parent if (-not (Test-Path $archiveDir)) { New-Item -ItemType Directory -Path $archiveDir -Force | Out-Null } $srcPath = Join-Path $workDir $artifactSrc if (-not (Test-Path $srcPath)) { - throw "Artifact source directory not found: $srcPath. Build succeeded (exit 0) but produced no output. Check GuestArtifactSource or use -SkipArtifact for builds that intentionally produce no files." + throw "Artifact source directory not found: $srcPath. Build succeeded (exit 0) but produced no output. Check GuestArtifactSource." } else { $7zip = 'C:\Program Files\7-Zip\7z.exe' @@ -471,7 +465,7 @@ try { } return $exit - } -ArgumentList $GuestWorkDir, $BuildCommand, $GuestArtifactZip, $GuestArtifactSource, $UseSharedCache.IsPresent, $ExtraGuestEnv, $SkipArtifact.IsPresent + } -ArgumentList $GuestWorkDir, $BuildCommand, $GuestArtifactZip, $GuestArtifactSource, $UseSharedCache.IsPresent, $ExtraGuestEnv if ($buildExit -ne 0) { throw "Build command failed (exit $buildExit)" @@ -534,11 +528,7 @@ try { } } - if ($SkipArtifact) { - Write-Host '[Invoke-RemoteBuild] Build succeeded. Artifact packaging skipped (-SkipArtifact).' - } else { - Write-Host "[Invoke-RemoteBuild] Build succeeded. Artifact at $GuestArtifactZip" - } + Write-Host "[Invoke-RemoteBuild] Build succeeded. Artifact at $GuestArtifactZip" } finally { Remove-PSSession $session -ErrorAction SilentlyContinue diff --git a/scripts/Start-BurnInTest.ps1 b/scripts/Start-BurnInTest.ps1 index 149e096..beaa932 100644 --- a/scripts/Start-BurnInTest.ps1 +++ b/scripts/Start-BurnInTest.ps1 @@ -49,7 +49,6 @@ param( [int] $Rounds = 3, [int] $Parallelism = 4, [string] $BuildCommand = 'powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File build.ps1', - [switch] $NoSkipArtifact, [int] $RoundTimeoutMinutes = 60 ) @@ -74,7 +73,6 @@ $burnInParams = @{ Rounds = $Rounds RoundTimeoutMinutes = $RoundTimeoutMinutes } -if (-not $NoSkipArtifact) { $burnInParams['SkipArtifact'] = $true } & "$scriptDir\Test-CapacityBurnIn.ps1" @burnInParams diff --git a/scripts/Test-CapacityBurnIn.ps1 b/scripts/Test-CapacityBurnIn.ps1 index e230957..eeebac1 100644 --- a/scripts/Test-CapacityBurnIn.ps1 +++ b/scripts/Test-CapacityBurnIn.ps1 @@ -124,10 +124,6 @@ param( [string] $BuildCommand = '', - # Skip artifact packaging and collection in every child job. - # Set this for burn-in and smoke runs that use delay-only build commands. - [switch] $SkipArtifact, - [ValidateRange(1, 10)] [int] $Parallelism = 4, @@ -215,9 +211,6 @@ for ($r = 1; $r -le $Rounds; $r++) { if ($BuildCommand -ne '') { $argList.Add('-BuildCommand'); $argList.Add($BuildCommand) } - if ($SkipArtifact) { - $argList.Add('-SkipArtifact') - } $argArray = $argList.ToArray()