Skip to content
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

Push "latest" tag #250

Closed
nigelgbanks opened this issue Oct 14, 2022 · 7 comments
Closed

Push "latest" tag #250

nigelgbanks opened this issue Oct 14, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@nigelgbanks
Copy link
Contributor

nigelgbanks commented Oct 14, 2022

@misilot, brought up a good idea on Slack to add latest tags. https://islandora.slack.com/archives/CM6F4C4VA/p1665586667980639

probably because there isn’t a latest tag being pushed to dockerhub on release
wonder if it would make sense to have tags like
latest (goes to latest tagged version), latest-dev that goes to the latest commit pushed , v1.0.7 (i think we don’t use the v…) but that would point to v1.0 and v1 as well so you could track what should be a stable release tree if following semver

So, tasks would be to:

Update existing tags such that they are prefixed with v, i.e. v1.0.7. Do not remove the old tags though.

Change release workflow to:

  • Check if the release is the highest SemVer of all tags, if so also push the latest tag.
  • Check if the release is the highest SemVer for its major version, if so also push to the major version tags v#.
  • Check if the release is the highest SemVer for its major/minor/patch version, if so also push to the major/minor version tags v#.#.

So, if the two tags 1.1.1 1.1.2, exist and a new 1.1.3 release is made it would create the following Docker tags on release.

  • v1.1.3
  • v1.1 (Replaces the existing v1.1, which would have been pointing to v1.1.2 previously)
  • v1 (Replaces the existing v1, which would have been pointing to v1.1.2 previously)
  • latest

N.B. Note that this does not create new tags in the Git repository, only tags for the Docker images produced, as it's not considered good practice to have Git tags that change which commit they point too.

Change push workflow to check if it is on the main branch, and the latest commit, in the main branch. In which case it should always push to latest-dev

@nigelgbanks nigelgbanks added the enhancement New feature or request label Oct 14, 2022
@nigelgbanks nigelgbanks self-assigned this Oct 14, 2022
@nigelgbanks
Copy link
Contributor Author

Some potential issues with latest and dev-latest tag, would be actions running concurrently. For example, if two branches get merged in quick succession to main. Both will think they are the latest. Since it takes build jobs sometimes 20 minutes to run, it could push inconsistent tags, i.e. from the two different commits.

@rosiel rosiel changed the title Push latest tag Push "latest" tag Nov 2, 2022
@rosiel
Copy link
Contributor

rosiel commented Nov 2, 2022

As someone who uses ISLE-DC for local one-off testing, I think this would be awesome.

@nigelgbanks
Copy link
Contributor Author

nigelgbanks commented Jan 14, 2023

The convention used else where on docker hub is not to prefix with v so we should likely do that as well, also all the existing tags we have do not have a v prefix so it's less work.

@nigelgbanks
Copy link
Contributor Author

Also we'll have a main tag so there really isn't a point in having a dev-latest as it can just be main and users can get the latest image for any branch just by using the branch name as the tag.

@nigelgbanks
Copy link
Contributor Author

@nigelgbanks
Copy link
Contributor Author

Done under #238

@nigelgbanks
Copy link
Contributor Author

latest in this case will be the latest release, the latest dev release will be tagged main. All development branches will be tagged for their branch names, we'll no longer be using commit hashes going forward for tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants