cryostatio / cryostat-grafana-dashboard

Apache License 2.0
0 stars 6 forks source link

[Task] CI should tag images like `2.4.0` rather than `cryostat-v2.4` #39

Closed andrewazores closed 8 months ago

andrewazores commented 10 months ago
          Looks good!

One RFE for later, this tags releases with the v prefix intact. It would be nice to strip this from the tag name when tagging the container image (e.g. v2.4.0 -> 2.4.0) to be consistent with other components.

Originally posted by @ebaron in https://github.com/cryostatio/cryostat-grafana-dashboard/pull/38#pullrequestreview-1578576093


See also #19 - maybe this is a duplicate of that?

andrewazores commented 10 months ago

There are a few options here:

  1. Add some logic to the existing ci.yml to check if the github.ref/github.ref_name matches cryostat-vX.Y, and if so, tag the image as X.Y.Z. Would Z always be 0, or how else would it be supplied?
  2. Change the release process - rather than creating release branches named like cryostat-v2.4, create a release branch named 2.4.0. The existing ci.yml action will automatically tag the image correctly in this case.
  3. Change the release process - create release branches named like cryostat-2.4.0. Combined approach of 1 and 2.
  4. Remove the github.ref_name from the ci.yml. In release branches, add a manual process step where the versioned tag is added or updated to the image tags list in the ci.yml. ie upstream main will always just be tagged main and latest, but a release cut from cryostat-v2.4 release branch will have its ci.yml updated to be tagged 2.4.0.
  5. Add some logic to the existing ci.yml using git describe or similar and use git tags to feed the version tag info to the CI build. This can be a replacement for or in addition to the github.ref_name (release branch name).
ebaron commented 10 months ago

It's probably okay to keep the image tags from the release branches as cryostat-v2.4. I was more concerned about when we actually cut the release. We could do something like check if it's a tag that triggered the workflow, and if so, strip the v off the beginning when tagging the image.