Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Add documentation for how to use snapcraft upload. #277
Conversation
ricardokirkner
reviewed
Jan 28, 2016
| +have an account on the [staging server](https://login.staging.ubuntu.com), then | ||
| +make sure you have the following environment variables defined: | ||
| + | ||
| + UBUNTU_STORE_API_ROOT_URL='https://myapps.developer.staging.ubuntu.com/dev/api/' |
ricardokirkner
Jan 28, 2016
Contributor
If we're considering documenting these environment variables, maybe it's best to just export a single variable to control whether STAGING or PRODUCTION is to be used to make developers life easier? (and we set the proper values based on that env var of flag internally).
kyrofa
Jan 28, 2016
Member
Not a bad idea. I'm not sure how often this will be used, honestly-- it's mostly here so I don't need to write it down somewhere else
elopio
Jan 28, 2016
Member
Agree. I use it a lot, so I appreciate when I can run the tests just using STAGING instead of the full urls.
wishlist bug?
ricardokirkner
reviewed
Jan 28, 2016
| +automated review. You'll be emailed when the review has completed, at which time | ||
| +you can visit the MyApps site and publish your .snap! Note that if you uploaded | ||
| +an update to an already-published .snap, your update will be automatically | ||
| +published as well unless you disable it in MyApps. |
ricardokirkner
Jan 28, 2016
Contributor
When uploading via the web UI developers get the option not to automatically publish the update, but I think this doesn't apply to uploads via the API (which snapcraft uses), which means updates uploaded via snapcraft will be automatically published as well.
|
LGTM overall. |
elopio
reviewed
Jan 28, 2016
| + | ||
| +### Staging server | ||
| + | ||
| +Snapcraft has the ability to upload .snaps for publication in the Snappy Store. |
elopio
reviewed
Jan 28, 2016
| +### Staging server | ||
| + | ||
| +Snapcraft has the ability to upload .snaps for publication in the Snappy Store. | ||
| +If you're working on a feature that involves that stuff, you might want to use |
elopio
reviewed
Jan 28, 2016
| +If you're working on a feature that involves that stuff, you might want to use | ||
| +the staging server instead of the production store. To do that, make sure you | ||
| +have an account on the [staging server](https://login.staging.ubuntu.com), then | ||
| +make sure you have the following environment variables defined: |
elopio
reviewed
Jan 28, 2016
| + Enter your Ubuntu One SSO credentials. | ||
| + Email: me@example.com | ||
| + Password: | ||
| + OTP: <press enter here if you haven't enabled two-factor authentication> |
elopio
Jan 28, 2016
Member
@ricardokirkner can we change OTP for something more user friendly like One-time password?
Also can we show it only when 2fa is enabled?
ricardokirkner
Jan 28, 2016
Contributor
Printing a different string is certainly possible. Only requiring it for 2fa enabled accounts would require some non-trivial changes, essentially:
- attempt the login without asking (nor sending) the OTP
- if the login attempt fails, analyze the failure message and if the error is because an OTP is required, ask the user for it and retry step 1.
kyrofa
Jan 28, 2016
Member
We at least need a way to say "press enter if you don't have 2fa enabled" or something. Because I expect a lot of users would stop right there.
elopio
reviewed
Jan 28, 2016
| + Password: | ||
| + OTP: <press enter here if you haven't enabled two-factor authentication> | ||
| + Authenticating against Ubuntu One SSO. | ||
| + Starting new HTTPS connection (1): login.ubuntu.com |
ricardokirkner
Jan 28, 2016
Contributor
Possibly, would need investigating how to turn that off as that's being printed by urllib directly (under the hood)
sergiusens
Jan 28, 2016
Collaborator
Right, we solve this when using requests by upping the logging level for urllib.
elopio
reviewed
Jan 28, 2016
| + | ||
| +Get into the directory containing the `snapcraft.yaml`, and do the following: | ||
| + | ||
| + $ snapcraft upload |
ricardokirkner
Jan 28, 2016
Contributor
Possibly... it's a nice shortcut. Not sure how useful it'll be unless you're certain it'll built properly
elopio
reviewed
Jan 28, 2016
| + Uploading files... | ||
| + Starting new HTTPS connection (1): upload.apps.ubuntu.com | ||
| + Uploading new version... | ||
| + Starting new HTTPS connection (1): myapps.developer.ubuntu.com |
elopio
reviewed
Jan 28, 2016
| + Package scan completed. | ||
| + Application uploaded successfully. | ||
| + Uploaded as revision 1. | ||
| + Please check out the application at: https://myapps.ubuntu.com/dev/click-apps/1337/. |
elopio
Jan 28, 2016
Member
When you put a dot at the end of an URL, the most common mistake is to use the dot when copy-pasting it.
elopio
reviewed
Jan 28, 2016
| +Your .snap has now been uploaded to the store, and is now undergoing an | ||
| +automated review. You'll be emailed when the review has completed, at which time | ||
| +you can visit the MyApps site and publish your .snap! Note that if you uploaded | ||
| +an update to an already-published .snap, your update will be automatically |
elopio
Jan 28, 2016
Member
uploaded an update is hard to say. What about uploaded a new version of an ...
elopio
reviewed
Jan 28, 2016
| @@ -323,7 +323,8 @@ We'll be happy to help you on the mailing list to build a snappy package of | ||
| anything that you are interested in. Choose a good name for it, and you can | ||
| very easily share it in | ||
| [ubuntu myapps](https://myapps.developer.ubuntu.com/dev/click-apps/?format=snap) | ||
| -where you go to share it with other snappy users. | ||
| +where you go to share it with other snappy users. You can even use Snapcraft to | ||
| +[upload for you](upload-your-snap.md)! |
elopio
Jan 28, 2016
Member
Nice! Thanks for the great work @ricardokirkner.
And @kyrofa of course for documenting it.
|
This is great. Most of my comments are about things that can be reported as bugs for the future. |
|
oh, right. And I guess we need to discuss if we should use .snap or snap. |
Nahh, I already replaced them. No problem! |
added a commit
that referenced
this pull request
Jan 28, 2016
kyrofa
merged commit 83d9582
into
snapcore:master
Jan 28, 2016
|
|
kyrofa commentedJan 28, 2016
This PR resolves LP: #1539234 by adding a document that walks a developer through uploading a snap.