canonical / charmcraft

Collaborate, build and publish charmed operators for Kubernetes, Linux and Windows.
Apache License 2.0
64 stars 66 forks source link

`charmcraft promote-charm` command #1633

Open lengau opened 3 months ago

lengau commented 3 months ago

What needs to get done

Promote a charm from one channel to another in a command.

This would be a charm version of promote-bundle.

Why it needs to get done

To match snapcraft and developer convenience.

syncronize-issues-to-jira[bot] commented 3 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2708.

This message was autogenerated

lengau commented 3 months ago

The logic already roughly exists in the promote-bundle command, it just needs to be made standalone: https://github.com/canonical/charmcraft/blob/b6baa10566e3f3933cbd42392a0fe62cc79d2b6b/charmcraft/application/commands/store.py#L941

sed-i commented 3 months ago

Yes please!

(Duplicates #836.)

sed-i commented 3 months ago

It would be really great if there was also an extra flag to promote all risks of a given track. For example:

charmcraft promote-track latest prometheus-k8s

would promote all revisions to lower risks on the given track.

  1. candidate -> stable
  2. beta -> candidate
  3. edge -> beta
alnvdl-work commented 2 months ago

As a note: it looks like the charming-actions/release-charm supports a way of doing this through GH Actions as well. See: https://github.com/canonical/charming-actions/tree/main/release-charm

I didn't test it myself though.

lucabello commented 2 months ago

Any update on this? Some form of charmcraft promote would be very helpful, because currently bumping a set of charms to the lower risk tracks is quite cumbersome :)

tmihoc commented 1 month ago

There is now a GitHub action for this: https://github.com/canonical/charming-actions/tree/2.6.0/promote-charm

We've documented it: https://juju.is/docs/sdk/publishing?#heading--promote-a-charm-revision-to-a-lower-risk-level-of-the-same-track

But, the community would still love a Charmcraft way of doing it.