Releasing multiple revisions

I manage a bunch of snaps, some of which are available across numerous architectures. e.g.

root@snapcrafters:~# snapcraft status ddgr
Track    Arch     Channel    Version    Revision
latest   amd64    stable     1.6        188
                  candidate  ^          ^
                  beta       1.6        188
                  edge       1.6        195
         arm64    stable     1.6        191
                  candidate  ^          ^
                  beta       1.6        191
                  edge       1.6        196
         armhf    stable     1.6        190
                  candidate  ^          ^
                  beta       1.6        190
                  edge       1.6        197
         i386     stable     1.6        187
                  candidate  ^          ^
                  beta       1.6        187
                  edge       1.6        193
         ppc64el  stable     1.6        189
                  candidate  ^          ^
                  beta       1.6        189
                  edge       1.6        194
         s390x    stable     1.6        186
                  candidate  ^          ^
                  beta       1.6        186
                  edge       1.6        192

So when I get a security mail (which are <3 btw) I have to rebuilt (which is one button press) then test and release a bunch of revisions.

Previously I’d go snapcraft release ddgr 192 stable,beta then snapcraft release ddgr 194 stable,beta which can be made better with for f in 186 187 188 189 190 191; do snapcraft release ddgr $f stable,beta; done but that’s still quite manky and error prone if I typo a revision.

Can I get some kind of snapcraft release ddgr --from edge --to stable,beta or some other meaningful way to release en-masse?

or snapcraft release _snap_name_ 186-191 stable,beta

1 Like

True, but they’re not always consecutive. Usually they are, but sometimes not.

1 Like

You can do this on https://snapcraft.io/SNAP/releases using the promote action at the left of each risk.

The snapcraft CLI doesn’t currently support this experience, but it’s been discussed.

2 Likes

It has been discussed on Snapcraft promote but still needs another iteration. Previously it was discussed on Snapcraft release support for from:risk to:risk

Implementing an experience like what is now presented on the web is not that hard, but once we do it, we cannot change it as easily as the web ui can (probably not wise to change it at all), so we need to get it right.

2 Likes

I just wanted to follow up with a screenshot illustrating what @wgrant suggested. This is a great feature allowing us to release multiple revisions of a snap from different architectures at once. Here, you can see I’m releasing the latest build of jenkins from the edge channel to other channels.

(comments about how many tabs I have open to /dev/null pls) :smiley:

Here, I have selected what’s in edge to push to beta and stable. I just need to press ‘apply’ to take effect.

Done…

2 Likes