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): handle release builds in GHA CI workflow #1561

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

BradLugo
Copy link
Contributor

@BradLugo BradLugo commented Jul 8, 2024

Description

Our tag make target relies on the RELEASE_TAG environment variable being set to the tag name when we perform a release build. Many of our scripts and processes rely on make tag outputting the current string (like the release version). We used to set this environment variable properly in OSCI due to:

handle_release_runs

scanner/scripts/ci/lib.sh

Lines 696 to 706 in 372710a

handle_release_runs() {
if ! is_OPENSHIFT_CI; then
die "Only for OpenShift CI"
fi
local base_ref
base_ref="$(get_base_ref)"
if is_tagged && [[ "$base_ref" =~ ^release- ]]; then
ci_export RELEASE_TAG "$(git tag --sort=creatordate --contains | tail -1)"
fi
}

For these changes, I copied the stackrox/stackrox pattern for handling tagged builds in our GitHub Action workflow, which was added in this PR: stackrox/stackrox#4239

Note: This needs to be cherry-picked into the release-2.34 branch.

@BradLugo BradLugo requested review from RTann and dcaravel July 8, 2024 07:12
Copy link
Contributor

@dcaravel dcaravel left a comment

Choose a reason for hiding this comment

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

LGTM, once merged will cherry-pick and re-tag

@RTann RTann merged commit 984e221 into master Jul 8, 2024
31 checks passed
@RTann RTann deleted the blugo/fix-ci-release-builds branch July 8, 2024 14:58
@RTann
Copy link
Collaborator

RTann commented Jul 8, 2024

@BradLugo, I merged it now so @dcaravel can recut the release asap. Thanks for doing this

@dcaravel dcaravel mentioned this pull request Jul 8, 2024
dcaravel added a commit that referenced this pull request Jul 8, 2024
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.

3 participants