mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-26 19:34:22 +08:00
Fix seed max value for Container Linux CI (#24510)
This commit is contained in:
parent
2f4f585e7f
commit
38c2258954
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user