Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ci/release-image/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ group "default" {

target "code-server" {
dockerfile = "ci/release-image/Dockerfile"
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!

]
platforms = ["linux/amd64", "linux/arm64"]
}