Skip to content

Automate latest docker version determining for re-tagging #3905

Closed
@porunov

Description

In #3842 the file .github/workflows/docker-release-tags.yml is added which is responsible of re-tagging docker releases.
In that file LATEST_RELEASE environment variable is hardcoded to 0.6 right now, but any time a new Major or Minor version is release, we must manually update that environment variable in all files of all branches available.
This opens gates to new bugs because it's easy to forget to update this variable in some of the branches where this file exists.
Instead, we should improve the flow to automatically determine the current latest version and re-tag latest tag if the newly uploaded docker release version is higher than the one which is currently tagged by latest tag.
For example, the automation flow could look something like this:

  1. Fetch janusgraph/janusgraph:latest manifest.
  2. Find revision number of the fetches image.
  3. Fetch all tags of the determined revision number.
  4. Find the tag which matches the semantic versioning regex pattern (I.e. major.minor.patch).
  5. Compare the version of the newly uploaded docker images to the version of the image which is tagged by latest tag.
  6. If the new version is higher than the old version - re-tag latest tag to the new docker image.
    This way we can remove LATEST_RELEASE from the file and automatically determine current latest version instead.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions