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

This commit is contained in:
Aditya Patwardhan 2024-10-30 17:16:30 -07:00 committed by GitHub
parent 2f4f585e7f
commit 38c2258954
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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