shizunge / gantry

Automatically update Docker swarm services.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SemVer image tags?

dazinator opened this issue · comments

We release images using semantic version tags.
e.g

  • "foo/bar:0.0.1-alpha.1" (this a pre-release)
  • "foo/bar:0.0.1-alpha.2" (this a pre-release)
  • "foo/bar:0.0.1" (this the stable release)

Is this tool capable of detecting new images based on https://semver.org/ rules? If not I think this would be very valuable.
We have a dev swarm cluster, and staging and prod cluster. I'd only want to auto update swarm services on the dev cluster based on greater "pre-release" semver image tags. On staging and prod I would want to exclude "pre-release" image tags and only pull updates based on greatest "stable" image tags (i.e sem ver tags without any pre-release label component)

No. That requires scanning the entire repo to find the tag and it is beyond the capability of this tool today.

Do you know you can have more than one tag on the same image.

You can let your staging service subscribe to the push-to-staging tag. Then assign that tag to your pre release images in addition to the version tag. When you assign an existing tag to a new image, the registry should remove it from the old image, but still keep other tags on the old image.