Fix seed max value for Container Linux CI (#24510) (#24511)

This commit is contained in:
Aditya Patwardhan
2024-10-30 20:57:41 -07:00
committed by GitHub
parent 30b9b9ddbf
commit d50eeea479
+6
View File
@@ -863,11 +863,17 @@ function Invoke-InitializeContainerStage {
# For PRs set the seed to the PR number so that the image is always the same
$seed = $env:SYSTEM_PULLREQUEST_PULLREQUESTID
if(!$seed) {
# for non-PRs use the integer identifier of the build as the seed.
$seed = $fallbackSeed
}
# cut down to 32 bits and keep the most varying parts, which are lower bits
if ($seed -ge [Int32]::MaxValue) {
$seed = [int]($seed -band [int]::MaxValue)
}
Write-Verbose "Seed: $seed" -Verbose
# Get the latest image matrix JSON for preview