Skip to content
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

fix(ci): fallback to previous release when attempting unreleased version #1568

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

RTann
Copy link
Collaborator

@RTann RTann commented Jul 12, 2024

When RELEASE_VERSIONS.txt is updated to a new unreleased minor version, the diff-dumps job fails to upload the latest offline vulnerability data. That is because (as mentioned, the latest minor version does not exist, so we we attempt to pull its related data, there is nothing there.

This PR now will check if the latest version is unreleased. If that's the case, then it falls back to the latest released version, so offline vuln updates may continue.

We determine if there is a release by checking for the existence of the tag in the stackrox/stackrox repo. If it returns a 200, it exists. If it returns a 404, then it doesn't exist. Any other status code means there is some other kind of error, so we should fail

@RTann RTann requested review from jvdm, BradLugo, daynewlee, dcaravel and a team July 12, 2024 16:33
scripts/ci/jobs/diff-dumps.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@BradLugo BradLugo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor suggestion. Everything else LGTM!

scripts/ci/jobs/diff-dumps.sh Outdated Show resolved Hide resolved
@RTann RTann merged commit aad60be into master Jul 12, 2024
30 checks passed
@RTann RTann deleted the ross-fix-4.5-diff-dumps branch July 12, 2024 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants