Using snapcraft to adjust what's published in the tracks/channels


#1

There are times when you need to be able to adjust what is showing up as the published snap in the snap store. Uses might include

  • reverting the released revision of a snap to an earlier one either due to an issue or to enable giving folks access to test properly.
  • Manually copying a revision from the latest track to the mirror track for the stable release. Currently that would mean copying something from the latest track to the 2.4/ track.

To do so you need a few things. First, you need to install the snapcraft cli tool. Next, you need to identify the revisions of the snap you need to use in the cli tool. You can find these on the older snapcraft dashboard site. You might need to be granted access if the site does not show the history for your snaps.

https://dashboard.snapcraft.io/snaps/

Once there, use the View All link to go through the history. You should see regular updates to the edge channel tracking trunk but also throughout the history of other branches that are published.

Once you’ve found the release number of what you want to use, make sure to find all four of those release numbers. There should be one for each of the four architectures built.

From there you can use the snapcraft tool to release those revisions to the track/channel you want. For example

snapcraft release juju 5011 2.4/candidate

Going Stable

When you release a new stable you want to clear the candidate channel so that folks get the now-stable release.

snapcraft release juju 5011 2.4/stable
snapcraft close juju 2.4/candidate