Pass current revision for windows tests to allow usage of latest helper image version
The following should be enough to pass the revision to the windows tests.
diff --git a/ci/test_windows.ps1 b/ci/test_windows.ps1
index c4a668caa..b83f0b03c 100644
--- a/ci/test_windows.ps1
+++ b/ci/test_windows.ps1
@@ -13,6 +13,9 @@ $executionSize = [int]($numberOfDefinitions / $env:CI_NODE_TOTAL)
$nodeIndex = $env:CI_NODE_INDEX - 1
$executionOffset = ($nodeIndex * $executionSize)
+$revision = ((git rev-parse --short=8 HEAD) | Out-String).TrimEnd()
+$goLdflags = "-X gitlab.com/gitlab-org/gitlab-runner/common.REVISION=$revision"
+
Write-Information "Number of definitions: $numberOfDefinitions"
Write-Information "Suite size: $env:CI_NODE_TOTAL"
Write-Information "Suite index: $env:CI_NODE_INDEX"
@@ -29,7 +32,7 @@ Get-Content $testsDefinitionsFile | Select-Object -skip $executionOffset -first
Write-Information "`r`n`r`n--- Starting part $index of go tests of '$pkg' package:`r`n`r`n"
- go test -v $pkg -run "$tests" | Tee ".testoutput/${pkgSlug}.${index}.windows.${WINDOWS_VERSION}.output.txt"
+ go test -v $pkg -ldflags "$goLdflags" -run "$tests" | Tee ".testoutput/${pkgSlug}.${index}.windows.${WINDOWS_VERSION}.output.txt"
if ($LASTEXITCODE -ne 0) {
$failed += "$pkg-$index"
Blocked by #26678 since the newest windows helper image isn't available during the tests