-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fixing bundle creation and verification #198
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #198 +/- ##
=======================================
Coverage 61.78% 61.78%
=======================================
Files 2 2
Lines 785 785
=======================================
Hits 485 485
Misses 249 249
Partials 51 51
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -109,8 +109,9 @@ jobs: | |||
- name: Set Operator version | |||
id: operator-version | |||
run: | | |||
if [[ ${GITHUB_REF_NAME/\//-} =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-.+)?$ ]]; then | |||
echo "VERSION=${GITHUB_REF_NAME/\//-}" >> $GITHUB_ENV | |||
tag=${{GITHUB_REF_NAME}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GITHUB_REF_NAME
often contains slashes, such as in the case of branch names like docs/foo
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, but it would be the same for the if condition, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean when we set the version to it, we need to replace all slashes with another char, as the slash symbol is not allowed in the manifests, I recon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so on 114 we need to add the string replace?
/\//-
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or add it on 112 and remove the leading "v" in the regex in 113.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say it's not needed, since VERSION
assignment happens within 2 branches of the conditional. First case matching the REGEX, SemVer with leading "v" and beta tags (as in v0.9.0-cr1
) and the second when doesn't match it assigns the ref sha.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood, @didierofrivia. Thanks for clarifying.
Signed-off-by: dd di cesare <[email protected]>
d2cddab
to
0916b62
Compare
This PR aims to fix the bundle creation and verification when the tag is SEMVER. Assigning
VERSION
from the GITHUB_REF_NAME:Removing the leading
v
in order to pass the expected version to the Makefile target.Currently it was passing:
Failing the job and not pushing the images.