Skip to content

Push latest Docker tag along with version tag #4120

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

Merged
merged 1 commit into from
Sep 8, 2021

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented Sep 8, 2021

@code-asher code-asher requested a review from a team as a code owner September 8, 2021 19:26
@code-asher code-asher added the ci Issues related to ci label Sep 8, 2021
@code-asher code-asher added this to the 3.12.0 milestone Sep 8, 2021
@codecov
Copy link

codecov bot commented Sep 8, 2021

Codecov Report

Merging #4120 (0601561) into main (b00afbc) will not change coverage.
The diff coverage is n/a.

❗ Current head 0601561 differs from pull request most recent head b4df05f. Consider uploading reports for the commit b4df05f to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4120   +/-   ##
=======================================
  Coverage   64.12%   64.12%           
=======================================
  Files          36       36           
  Lines        1873     1873           
  Branches      379      379           
=======================================
  Hits         1201     1201           
  Misses        571      571           
  Partials      101      101           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b00afbc...b4df05f. Read the comment docs.

Copy link
Contributor

@jawnsy jawnsy left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me

tags = ["docker.io/codercom/code-server:${VERSION}"]
tags = [
"docker.io/codercom/code-server:latest",
notequal("latest",VERSION) ? "docker.io/codercom/code-server:${VERSION}" : "",
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, this doesn't seem like it'd work correctly in the case where we're trying to re-build an old version (not sure if we ever do that though) since latest would move "backwards"

Seems we'd need some way to check the "current" latest version and compare before we update the tag, to make that work correctly

I guess this seems like a decent enough solution 🤷‍♂️

Copy link
Member Author

@code-asher code-asher Sep 8, 2021

Choose a reason for hiding this comment

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

We might be covered by the check here, more as a side effect though and only for versions already uploaded:

https://github.com/code-asher/code-server/blob/b4df05f8b9ed3cced01d8a95d7a26f6e2928be58/ci/steps/docker-buildx-push.sh#L21

We could add a check here to see if it is greater than the latest version available and only then add latest (through a second env var I think).

Copy link
Member Author

Choose a reason for hiding this comment

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

fwiw this does bring us back to what we had before we switched to buildx (always push to latest)

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough, don't let me stand in your way! 🙈

Copy link
Member Author

Choose a reason for hiding this comment

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

Made an issue: #4121 Thanks for the suggestion!

@code-asher code-asher merged commit 7a73501 into coder:main Sep 8, 2021
@code-asher code-asher deleted the docker-push-latest branch September 8, 2021 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Issues related to ci
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants