Skip to content
This repository was archived by the owner on Feb 10, 2020. It is now read-only.

Commit e4c359d

Browse files
authored
Merge pull request #538 from canonical-websites/refresh-snap-store-flow
Update snap store flow to match new UX
2 parents 751589f + be3ec62 commit e4c359d

File tree

2 files changed

+49
-26
lines changed

2 files changed

+49
-26
lines changed

tutorials/packaging/create-your-first-snap.md

Lines changed: 48 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ confinement: devmode # use 'strict' once you have the right plugs and slots
152152
This part of `snapcraft.yaml` is mandatory and describes the very basics of the snap metadata. Let’s go through this line by line:
153153
154154
- **name** describes the name of the snap.
155-
- **version** is the current version of the snap. This is just a human readable string. The ascii order doesn’t matter: all snap uploads will get an incremental snap **revision**, which is independant from the version. It’s separated so that you can upload multiple times the same snap for the same architecture with the exact same version. See it as a string that indicates to your user the current version, like “stable”, “2.0” and such.
155+
- **version** is the current version of the snap. This is just a human readable string. The ascii order doesn’t matter: all snap uploads will get an incremental snap **revision**, which is independent from the version. It’s separated so that you can upload multiple times the same snap for the same architecture with the exact same version. See it as a string that indicates to your user the current version, like “stable”, “2.0” and such.
156156
- **summary** is a short, one-line summary or tag-line for your snap.
157157
- **description** should provide the user with enough information to judge if the snap is going to be useful to them. This description can span over multiple lines if prefixed with **|**.
158158
- **grade** can be used by the publisher to indicate the quality confidence in the build. The store will prevent publishing "devel" grade builds to stable channels.
@@ -486,7 +486,7 @@ One last thing you might want to do before the snap is ready for wider consumpti
486486
487487
488488
negative
489-
: Users of snaps using `devmode`, will need to pass `--devmode` during the installation, so they explicitly agree to trust you and your snap. Another benefit of removing devmode is that you will be able to ship your snap on the **stable** or **candidate** channels (you can only publish to the other channels, like **beta** or **edge** as your snap is less trusted) and users will be able to search for it using `snap find`.
489+
: Users of snaps using `devmode`, will need to pass `--devmode` during the installation, so they explicitly agree to trust you and your snap. Another benefit of removing devmode is that you will be able to ship your snap on the **stable** or **candidate** channels (you can only release to the other channels, like **beta** or **edge** as your snap is less trusted) and users will be able to search for it using `snap find`.
490490
491491
492492
For this to be declared in your snap, let’s set `confinement` to `strict` in your `snapcraft.yaml`:
@@ -551,7 +551,7 @@ positive
551551
552552
You are done. This snap is ready for publication!
553553
554-
## Upload to the store
554+
## Push to the store
555555
Duration: 5:00
556556
557557
@@ -560,29 +560,34 @@ positive
560560
Check or download [here][here3] to see what your current directory should look like.
561561
562562
563-
Apps can easily be uploaded to the store via [My Apps]. Registering an account is easy, so let’s do that first.
563+
Apps can easily be uploaded to the [Snap Store](https://snapcraft.io/discover/). Registering an account is easy, so let’s do that first.
564564
565565
### Registering an account
566566
567-
Open My Apps in your browser and follow the instructions to register an account:
567+
Open the [snapcraft dashboard](https://dashboard.snapcraft.io/dev/account/) in your browser and follow the instructions to register an account:
568568
569569
570-
![IMAGE](https://assets.ubuntu.com/v1/2cb98ee4-screen1.png)
570+
![IMAGE](https://assets.ubuntu.com/v1/3569be21-Screenshot-2017-12-8+Sign+in+to+see+your+snaps.png)
571571
572572
Select "I am a new Ubuntu One user” and complete the needed data.
573573
574-
![IMAGE](https://assets.ubuntu.com/v1/32614c93-screen2.png)
574+
![IMAGE](https://assets.ubuntu.com/v1/47ddef27-Screenshot-2017-12-8+Log+in.png)
575575
576-
Enter your email address, name and password, accept the terms of service and create the account. Remember as well to choose a namespace on myapps before registering your snap.
576+
Enter your email address, name and password, accept the terms of service and create the account. Remember as well to choose a "Snap store username", that will identify you as a developer, before registering your snap.
577577
578-
It’s then time for you to get authenticated from snapcraft:
578+
### Command-line authentication
579+
580+
It’s time for you to get authenticated from snapcraft:
581+
582+
To do so, use the `snapcraft login` command.
579583
580584
If it is your first time you will get a message to enable multifactor authentication and agree with the developer terms and conditions.
581585
582586
583587
```bash
584588
~/hello$ snapcraft login
585-
Enter your Ubuntu One SSO credentials.
589+
Enter your Ubuntu One e-mail address and password.
590+
If you do not have an Ubuntu One account, you can create one at https://dashboard.snapcraft.io/openid/login
586591
Email: myemail@provider.com
587592
Password:
588593
One-time password (just press enter if you don't use two-factor authentication):
@@ -596,12 +601,26 @@ You can logout any time with simply `snapcraft logout`.
596601

597602
Before being able to upload any snap, you need to register (meaning: reserving) a name. That way, this snap name is yours, and you will be able to upload snaps matching this name.
598603

599-
To reserve a new name, simply try:
604+
To reserve a new name, simply try `snapcraft register`:
600605

601606

602607
```bash
603608
~/hello$ snapcraft register hello-<yourname>
604609
snapcraft register hello-<yourname>
610+
611+
We always want to ensure that users get the software they expect
612+
for a particular name.
613+
614+
If needed, we will rename snaps to ensure that a particular name
615+
reflects the software most widely expected by our community.
616+
617+
For example, most people would expect ‘thunderbird’ to be published by
618+
Mozilla. They would also expect to be able to get other snaps of
619+
Thunderbird as 'thunderbird-$username'.
620+
621+
Would you say that MOST users will expect 'hello-<yourname>' to come from
622+
you, and be the software you intend to publish there? [y/N]: y
623+
605624
Registering hello-<yourname>.
606625
Congratulations! You're now the publisher for 'hello-<yourname>'.
607626
```
@@ -616,7 +635,7 @@ If you changed your snap name while registering, you need to rebuild this snap w
616635
name: hello-didrocks
617636
[…]
618637
```
619-
- as we want to publish it in the candidate channel, we need to set its grade to stable:
638+
- as we want to release it in the candidate channel, we need to set its grade to stable:
620639
621640
```bash
622641
grade: stable
@@ -637,11 +656,11 @@ Snapping 'hello-didrocks' -
637656
Snapped hello-didrocks_2.10_amd64.snap
638657
```
639658
640-
### Upload your snap
659+
### Push and release your snap
641660
642661
It’s high time to make this snap available to the world!
643662
644-
Let’s try to publish it to the **candidate** channel for now:
663+
Let’s try to release it to the **candidate** channel for now:
645664
646665
```bash
647666
~/hello$ snapcraft push hello-didrocks_2.10_amd64.snap --release=candidate
@@ -659,24 +678,29 @@ beta ^ ^
659678
edge ^ ^
660679
```
661680
662-
You should receive an email telling you that your snap is pending review (automatic checking). If you are not using any reserved interfaces and security checks are passing, it would be available to the user (in the **candidate**, **beta** and **edge** channels in this case) to your users via a simple:
663-
681+
You should receive an email telling you that your snap is pending review (automatic checking). If you are not using any reserved interfaces and security checks are passing, it would be available to the user (in the **candidate** channel in this case) to your users via a simple:
664682
665683
```bash
666-
$ sudo snap install hello-didrocks --channel=candidate
684+
sudo snap install hello-didrocks --channel=candidate
667685
```
668686
669-
670687
negative
671-
: As you uploaded an amd64 binary, only people on amd64 machine will get access to this snap. You can either only focus on one architecture to support, build yourself for all supported architectures your snap, or use **launchpad snap build service** to push your `snapcraft.yaml`, and get resulting snaps built on all architectures for you! More information are [available here].
688+
: As you uploaded an amd64 binary, only people on 64-bit machines will get access to this snap. You can either only focus on one architecture to support, manually build a binary for each architecture you wish to support, or use [build.snapcraft.io](https://build.snapcraft.io) to push your `snapcraft.yaml`, and get resulting snaps built on all architectures for you!
672689
673-
From here, if you are happy with the testing of your snap, you can snapcraft push again the same file, omitting `--release` option to publish a revision 2 in the **stable** channel. You can use the website as well and check the box for the channels you want this revision 1 to be published to.
690+
From here, if you are happy with the testing of your snap, you can use the `snapcraft release` command to have fine-grained control over what you are releasing and where:
674691
675-
Remember that snaps with `confinement: devmode` can’t be published to the **stable** or **candidate** channels.
692+
The general syntax is:
693+
```bash
694+
snapcraft release <snap-name> <revision> <channel>
695+
```
676696
697+
So, to release hello-didrocks to the stable channel, and make it immediately visible in the store:
677698
678-
positive
679-
: Note: both of these steps (registering and uploading new snaps) are also available through the web interface. You then just upload your .snap files after clicking on **New Snap** on the website and filling in the form.
699+
```bash
700+
snapcraft release hello-didrocks 1 stable
701+
```
702+
703+
Remember that snaps with `confinement: devmode` can’t be released to the **stable** or **candidate** channels.
680704
681705
The web interface will give you information about the publication status. Take a look to see all the available options!
682706
@@ -716,7 +740,7 @@ By now you should successfully have built your first snap, fixed build issues, e
716740
[here3]: https://github.com/ubuntu/snap-tutorials-code/tree/master/create-your-first-snap/step5
717741
[here4]: https://github.com/ubuntu/snap-tutorials-code/tree/master/create-your-first-snap/step6
718742
[My Apps]: https://dashboard.snapcraft.io/dev/snaps/
719-
[available here]: https://kyrofa.com/posts/building-your-snap-on-device-there-s-a-better-way
743+
[available here]: https://docs.snapcraft.io/build-snaps/builders
720744
[this]: https://github.com/ubuntu/snap-tutorials-code/tree/master/create-your-first-snap/final
721745
[build a nodejs service]: https://tutorials.ubuntu.com/tutorial/build-a-nodejs-service
722746
[snapcraft forum]: https://forum.snapcraft.io/

tutorials/packaging/snap-a-website.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,7 @@ What a journey! If this is the first time you installed a snap or created a LXD
667667

668668
### How to share my snap with the world?
669669

670-
You can release it in the Snap Store and make it available privately or publicly in 5 minutes.
671-
Publishing steps are available in the [snapcraft docs](https://docs.snapcraft.io/build-snaps/publish).
670+
To release it in the Snap Store and make it available to others, privately or publicly, follow the [publishing steps](https://docs.snapcraft.io/build-snaps/publish).
672671

673672
### What if the snap doesn't work?
674673

0 commit comments

Comments
 (0)