-
Notifications
You must be signed in to change notification settings - Fork 2
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
build-image: Use 'OKD_VERSION' instead hard code version #8
Conversation
Reviewer's Guide by SourceryThis pull request replaces the hardcoded OKD version with the 'OKD_VERSION' variable in the 'create_new_okd_release' function within the 'build-images.sh' script. This change ensures that the script uses the correct OKD version, which is defined as an environment variable. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @praveenkumar - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please add validation for the OKD_VERSION environment variable to ensure it's set and contains a valid version string.
- Consider adding documentation about the OKD_VERSION environment variable - where it should be set and what values are valid.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
# Create a new release of okd using oc | ||
create_new_okd_release() { | ||
oc adm release new --from-release registry.ci.openshift.org/origin/release-scos:scos-4.18 \ | ||
oc adm release new --from-release registry.ci.openshift.org/origin/release-scos:${OKD_VERSION} \ |
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.
suggestion: Consider adding validation for OKD_VERSION before usage
If OKD_VERSION is unset or empty, this could fail in unexpected ways. Consider adding a check like: [ -z "${OKD_VERSION}" ] && echo "Error: OKD_VERSION not set" && exit 1
# Create a new release of okd using oc | |
create_new_okd_release() { | |
oc adm release new --from-release registry.ci.openshift.org/origin/release-scos:scos-4.18 \ | |
oc adm release new --from-release registry.ci.openshift.org/origin/release-scos:${OKD_VERSION} \ | |
# Create a new release of okd using oc | |
create_new_okd_release() { | |
if [ -z "${OKD_VERSION}" ]; then | |
echo "Error: OKD_VERSION not set" >&2 | |
exit 1 | |
fi | |
oc adm release new --from-release registry.ci.openshift.org/origin/release-scos:${OKD_VERSION} \ |
ccd2e38
to
8e263e4
Compare
660a95d
to
6ef284d
Compare
Summary by Sourcery
Build:
OKD_VERSION
environment variable when creating a new OKD release.