canmove, Confirmed users
1,394
edits
(→How to upload files to tooltool: clarify that --folder points to a path on the local disk) |
(Add docs for uploading using the new relengapi based tooltool) |
||
| Line 200: | Line 200: | ||
All metadata about the upload is stored in the upload server. | All metadata about the upload is stored in the upload server. | ||
= How To Upload To Tooltool (new, not deployed yet) = | |||
{{note|This won't work until {{Bug|1148545}} is closed; at that point, make sure you're using the latest tooltool.py from https://github.com/mozilla/build-tooltool}} | |||
First, plan out your upload. Are all of the files you need to upload public? If not, tooltool also offers storage of "internal" files, which are not made publicly available but can be downloaded by those with proper permissions. Internal files might be under a non-redistribution license (e.g., Google SDKs, Microsoft DLLs), but '''most not include secrets''' such as passwords or private keys. | |||
Use the `tooltool.py` client to build a manifest containing the files you would like to upload, annotating each file with its visibility level: | |||
python tooltool.py add --visibility public gcc.tar.gz | |||
Next, you will need credentials for the upload. Tooltool is hosted on RelengAPI, so the credentials take the form of a RelengAPI token. To get such a token, to to https://api.pub.build.mozilla.org, log in, click on "Tokens", and issue a user token with the permissions ''tooltool.upload.internal'' and/or ''tooltool.upload.public'', depending on the nature of your upload. If you don't have internal permission, then the option won't be available to you. When you click "Issue", you'll get a long string which you should copy/paste into a (protected) file on your system, and pass to tooltool.py with ''--authentication-file''. | |||
Once all of that is in place, you're ready to perform the upload. Just like for a Git or Mercurial commit, you'll need to provide a message to indicate why you're making this upload. Including a bug reference is always helpful. | |||
python tooltool.py upload --authentication-file=~/.tooltool-token --message "Bug 1234567: add new frobnicator binaries" | |||
The tool will begin uploading and, when it's finished, may wait a minute or two longer until the files are verified by RelengAPI. If your upload fails for some reason, just restart it. Any files already completely uploaded will not need to be uploaded again. | |||
You can view the available files and uploads at https://api.pub.build.mozilla.org/tooltool. | |||
= Tooltool uploads: the old school = | = Tooltool uploads: the old school = | ||