-
Notifications
You must be signed in to change notification settings - Fork 311
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix push script #4249
fix push script #4249
Conversation
Signed-off-by: Javier Lopez <javier@okteto.com>
Signed-off-by: Javier Lopez <javier@okteto.com>
scripts/ci/push-image.sh
Outdated
@@ -23,16 +23,16 @@ | |||
fi | |||
|
|||
|
|||
beta_prerel_regex="^beta\.[0-9]+" | |||
beta_prerel_regex="beta\.[0-9]+" |
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.
Is it really the change in the regex that fixes this and not changing in the order if/elif
? This regex is checked against the prerel
so it will never have the MAYOR.MINOR.PATCH
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.
Agree, I think it is not needed that change. Not sure if it might break something or not. Given the current format of tag versioning it shouldn't be needed
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.
Yes, I needed to do it with my semver binary but now using the binary that we have in CI it seems to work as expected. Changing it
Signed-off-by: Javier Lopez <javier@okteto.com>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #4249 +/- ##
==========================================
- Coverage 45.60% 45.58% -0.03%
==========================================
Files 305 305
Lines 27602 27602
==========================================
- Hits 12589 12583 -6
- Misses 13940 13944 +4
- Partials 1073 1075 +2 |
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.
Changes looks good, I've been testing it and it works as expected. The only thing is the change in the regex. Don't think is needed as discussed inline, but I don't think it is a blocker to merge this
scripts/ci/push-image.sh
Outdated
@@ -23,16 +23,16 @@ | |||
fi | |||
|
|||
|
|||
beta_prerel_regex="^beta\.[0-9]+" | |||
beta_prerel_regex="beta\.[0-9]+" |
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.
Agree, I think it is not needed that change. Not sure if it might break something or not. Given the current format of tag versioning it shouldn't be needed
prerel="$(semver get prerel "${RELEASE_TAG}" || true)" | ||
version="$(semver get release "${RELEASE_TAG}" || true)" | ||
tags="okteto/okteto:${RELEASE_TAG},okteto/okteto:dev" | ||
|
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.
Nit: Would it be helpful to print prerel
and version
for debug purposes? It was really hard to debug the problem in the CI job as we don't log anything. I think it might be useful to print RELEASE_TAG
value plus the other 2 vars
Signed-off-by: Javier Lopez <javier@okteto.com>
Signed-off-by: Javier Lopez <javier@okteto.com>
* fix: push script Signed-off-by: Javier Lopez <javier@okteto.com> * refactor: uncomment push Signed-off-by: Javier Lopez <javier@okteto.com> * fix: use the same semver as ci Signed-off-by: Javier Lopez <javier@okteto.com> * fix: add beta regex Signed-off-by: Javier Lopez <javier@okteto.com> * feat: add debug logs Signed-off-by: Javier Lopez <javier@okteto.com> --------- Signed-off-by: Javier Lopez <javier@okteto.com> (cherry picked from commit a46a9da)
* fix: push script Signed-off-by: Javier Lopez <javier@okteto.com> * refactor: uncomment push Signed-off-by: Javier Lopez <javier@okteto.com> * fix: use the same semver as ci Signed-off-by: Javier Lopez <javier@okteto.com> * fix: add beta regex Signed-off-by: Javier Lopez <javier@okteto.com> * feat: add debug logs Signed-off-by: Javier Lopez <javier@okteto.com> --------- Signed-off-by: Javier Lopez <javier@okteto.com> (cherry picked from commit a46a9da) Co-authored-by: Javier L贸pez Barba <javier@okteto.com>
Proposed changes
DEV-288
There was an issue in the regex check. We were comparing if the string started with beta but we had the circle tag starting with 2.26.0.
Remove the ^ on the regex in order to check the whole string and not just if it starts with beta
How to validate
okteto build --platform "${PLATFORMS}" --build-arg VERSION_STRING="${RELEASE_TAG}" -t "${tags}" -f Dockerfile .
)Pushing okteto/okteto:2.26.0,okteto/okteto:dev,okteto/okteto:stable to Docker Hub
Pushing okteto/okteto:2.26.0-beta.7,okteto/okteto:dev,okteto/okteto:beta to Docker Hub
CLI Quality Reminders 馃敡
For both authors and reviewers: