ci: expand Windows feature fixtures and test Server 2022 (#2503)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2026-10-07 09:15:58 +02:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 72e10af92d
commit 56137ffdc1
16 changed files with 862 additions and 356 deletions
+20
View File
@@ -0,0 +1,20 @@
# Background CI steps attach virtual disks at the same time, which makes
# Mount-VHD fail with 0x800703E3. Serialize attaching and formatting them.
function Invoke-WithVhdLock([scriptblock]$ScriptBlock) {
$mutex = [System.Threading.Mutex]::new($false, "Global\windows-exporter-ci-vhd")
try {
try {
[void]$mutex.WaitOne()
} catch [System.Threading.AbandonedMutexException] {
# The previous owner exited without releasing; the lock is ours now.
}
try {
& $ScriptBlock
} finally {
$mutex.ReleaseMutex()
}
} finally {
$mutex.Dispose()
}
}