nice-to-have: implement all 6 tier items

- Get-CIJobSummary.ps1: already present with full implementation (marked done)
- Get-BuildArtifacts.ps1: add -JobId/-Commit params; Write-ArtifactManifest writes
  manifest.json (name, size, sha256, commit, jobId) after both Linux and Windows
  artifact collection branches
- Invoke-CIJob.ps1: add -GuestCPU/-GuestMemoryMB params; insert post-clone VMX
  override block (numvcpus/memsize rewrite) before vmrun start; pass -JobId/-Commit
  to Get-BuildArtifacts calls
- Watch-RunnerHealth.ps1: add -GiteaUrl/-GiteaCredentialTarget params; optional
  GET /api/v1/admin/runners check in Running branch warns if 0 online runners
- Install-CIToolchain-WinBuild2025.ps1: fill SHA256 hashes for Python 3.13.3,
  7-Zip 26.01, Node.js 22.14.0, dotnet-install.ps1
- Measure-CIBenchmark.ps1: add deltaKB field (linked-clone disk footprint in KB)
  measured post-clone; added to result object and summary Format-Table
This commit is contained in:
Simone
2026-05-13 10:38:49 +02:00
parent 8ca3e530c5
commit 6cd6bff882
6 changed files with 148 additions and 15 deletions
+37 -1
View File
@@ -159,7 +159,17 @@ param(
# Optional webhook URL (Discord/Gitea). When set, a background job fires a
# [WARNING] once the job has been running for 90 minutes.
[string] $WebhookUrl = ''
[string] $WebhookUrl = '',
# Optional per-job VMX CPU and RAM override (default 0 = use template value).
# Applied to the linked clone after New-BuildVM.ps1, before vmrun start.
# The template VMX is never modified.
# Example: -GuestCPU 4 -GuestMemoryMB 8192
[ValidateRange(0, 32)]
[int] $GuestCPU = 0,
[ValidateRange(0, 131072)]
[int] $GuestMemoryMB = 0
)
Set-StrictMode -Version Latest
@@ -402,6 +412,28 @@ try {
-JobId $JobId `
-VmrunPath $VmrunPath
# ── Optional VMX CPU/RAM override (post-clone, pre-start) ─────────────
if ($GuestCPU -gt 0 -or $GuestMemoryMB -gt 0) {
Write-Host "[Invoke-CIJob] Applying VMX override: CPU=$GuestCPU, RAM=${GuestMemoryMB}MB"
$vmxLines = Get-Content -LiteralPath $cloneVmxPath
if ($GuestCPU -gt 0) {
if ($vmxLines -imatch '^numvcpus\s*=') {
$vmxLines = $vmxLines -replace '(?i)^numvcpus\s*=.*', "numvcpus = `"$GuestCPU`""
} else {
$vmxLines = $vmxLines + "numvcpus = `"$GuestCPU`""
}
}
if ($GuestMemoryMB -gt 0) {
if ($vmxLines -imatch '^memsize\s*=') {
$vmxLines = $vmxLines -replace '(?i)^memsize\s*=.*', "memsize = `"$GuestMemoryMB`""
} else {
$vmxLines = $vmxLines + "memsize = `"$GuestMemoryMB`""
}
}
Set-Content -LiteralPath $cloneVmxPath -Value $vmxLines -Encoding UTF8
Write-Host "[Invoke-CIJob] VMX updated: $cloneVmxPath"
}
# ── Phase 3: Start VM ─────────────────────────────────────────────
Write-Host "`n[Phase 3/6] Starting VM..."
$startResult = Invoke-VmrunBounded -VmrunPath $VmrunPath `
@@ -546,6 +578,8 @@ try {
-SshKnownHostsFile $SshKnownHostsFile `
-GuestArtifactPath '/opt/ci/output' `
-HostArtifactDir $jobArtifactDir `
-JobId $JobId `
-Commit $Commit `
-IncludeLogs
} else {
& "$scriptDir\Get-BuildArtifacts.ps1" `
@@ -553,6 +587,8 @@ try {
-Credential $credential `
-GuestArtifactPath 'C:\CI\output\artifacts.zip' `
-HostArtifactDir $jobArtifactDir `
-JobId $JobId `
-Commit $Commit `
-IncludeLogs
}
Write-JobEvent -Phase 'phase6.artifacts' -Status 'success' -Data @{ dir = $jobArtifactDir }