ci: release packed charm to PR-specific Charmhub track (best-effort)#401
ci: release packed charm to PR-specific Charmhub track (best-effort)#401
Conversation
Signed-off-by: Leon <82407168+sed-i@users.noreply.github.com>
| uvx --quiet --from git+https://github.com/lucabello/noctua noctua charm release \ | ||
| "$CHARM_NAME" \ | ||
| --path "$path" \ | ||
| --channel "pr/edge/${{ github.event.pull_request.number }}" |
There was a problem hiding this comment.
Track should be dev/edge/<branch> probably
|
Also note that this should be at the very least optional, but might also warrant a new CI major version if we decide to go for it - in which case I'd have lots of adjustments I'd like to make to workflows in general Let's discuss it in the lead sync! |
|
Thinking about this a bit more; introducing this change would require a PR in all charms to explicitly enable it. We could bundle this in a new One more problem about this is that the automation would require one specific track where these charm revisions are released to. Using a new
Maybe if we look a bit more at the problem: do we actually need every PR commit of every charm to be uploaded to Charmhub? My understanding is that this applies when we want someone to try out a fix before we merge it. This shouldn't necessarily be our default behavior, as it encourages not writing tests in favor of verifying the correct behavior manually. As a reminder, there's already a one-liner to do this: ∮ noctua charm release <charm-name> --channel=<ephemeral-branch> --path <path-to-.charm>
∮ noctua charm release prometheus-k8s --channel=dev/edge/pr123 --path=./prometheus-k8s_ubuntu@24.04-amd64.charmConsidering the low barrier to do this manually, the complications around automating this, and the fact that this problem happens infrequently, maybe it's not worth implementing this in CI right now. If you feel strongly about it though, we can discuss :) |
This change adds a best-effort step to the pack-charm job that uploads/releases the packed charm to a PR-specific Charmhub track
pr/edge/<PR_NUMBER>. The step uses theCHARMHUB_TOKENand is markedcontinue-on-errorso failures won't block the workflow.Fixes #400.