Desktop Snap Releases
Contents
Desktop Snap Releases#
Snap is a package format supported by Canonical. It’s targeted to support every Linux distribution but it’s mainly available on Ubuntu at the moment. We’ve made Firefox publicly available on https://snapcraft.io/firefox since Firefox 59.0.
Channels used#
The snap store comes with the concept of tracks (à la Google Play Store). For more explanation about them, see https://docs.snapcraft.io/reference/channels. Release promotion automatically uploads to these tracks:
Brand name |
Track |
Notes |
---|---|---|
Firefox |
|
A human
has to
manually
promote
the Snap
to the
|
Firefox Beta |
|
|
Firefox Developer Edition |
N/A |
Not supported yet |
Firefox Nightly |
N/A |
Not supported yet |
Firefox ESR |
|
We plan
to use
|
Promote a snap to the stable
channel#
Who?#
Like for Google Play, Release Management is in change of deciding when they want to fully ship a Snap. Release Management has access to the web interface (and the CLI because credentials are the same) and performs the release action (like Google Play). If needed, Release Engineering can help.
When?#
Because, there is no roll out mechanism, Snaps are shipped to the entire population of a given channel. Unlike Google Play, we can roll back users to previous version, if needed. However, downgrades aren’t supported internally in Firefox. Based on these facts, we should ship when we have enough data of the stability on Linux.
How?#
The easy way: via web interface#
Connect to https://dashboard.snapcraft.io/snaps/firefox/. Your credentials will be asked, your 2FA code too. If it doesn’t, ‘select “Always” for “Require an authentication device”, and click “Update”’ like explained on this page.
On the left side, click on the release you want to ship.
On the “channel” section, click on the link “Release”. If brings you to a new page. If the page remains blank, reload it.
Check the
stable
box (leave thecandidate
one checked) and click onRelease
.
The more complete one: via command line#
Install
snapcraft
. The simplest way is via docker:docker pull snapcore/snapcraft:stable
, thendocker run -ti snapcore/snapcraft:stable bash
* alternatively:apt-get install snapcraft
snapcraft login
. Your credentials will be asked, your 2FA code too. If it doesn’t, ‘select “Always” for “Require an authentication device”, and click “Update”’ like explained on this page.snapcraft status firefox
outputs something like:
Track Arch Channel Version Revision
esr amd64 stable 60.0.2esr-2 98
candidate ^ ^
beta ^ ^
edge ^ ^
latest amd64 stable 60.0.1-2 89
candidate 60.0.2-1 97
beta 61.0b14-1 101
edge ^ ^
Note the revision of the
latest/candidate
(akacandidate
) snap. In this example:97
If you don’t see the version you are expecting, list all available revisions by running
snapcraft list-revisions firefox | head
snapcraft release firefox $REVISION stable
,$REVISION
being the number found in the previous (e.g.:97
).
How to manually push a snap to the store, in case automation failed?#
Install
snapcraft
and login (see previous paragraph)snapcraft push target.snap --release $CHANNEL
,$CHANNEL
being one ofesr
,candidate
,beta
.If you forgot
--release
in the previous command, you can still usesnap release [...]
(see previous paragraph) to make the snap available to a channel.
Refresh macaroons credentials#
Snaps operate via macaroons to authenticate requests against the
Store. These are used by k8s pushsnap
scriptworkers to perform
operations with the snaps.
When the macaroons token expiry, they need to be refreshed. Specific
instructions on how to do that lie within the ubuntu-store.txt
in
the private repo.
Refreshing collaborators#
Every now and then we need to curate the list of contributors that can handle the snaps. In order to for one to do so, please use the main RelEng account credentials and hop on the collaborators page and make those adjustements.