Skip to content

Fix seed max value for Container Linux CI #24510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tools/ci.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading