80
edits
m (Point to mozilla-central) |
No edit summary |
||
| Line 30: | Line 30: | ||
] | ] | ||
The simplest usecase for tooltool is to provide a manifest and the url of a tooltool server, and run a "fetch" command to download the files mentioned in the manifest: | The simplest usecase for tooltool is to provide a manifest and the url of a tooltool server (this url is not longer used,the last modified file is from 13-Oct-2015) , and run a "fetch" command to download the files mentioned in the manifest: | ||
python tooltool.py fetch --url http://tooltool.pub.build.mozilla.org/temp-sm-stuff -m my-manifest.tt | python tooltool.py fetch --url http://tooltool.pub.build.mozilla.org/temp-sm-stuff -m my-manifest.tt | ||
| Line 36: | Line 36: | ||
If a manifest name is not provided, tooltool will default to manifest.tt. | If a manifest name is not provided, tooltool will default to manifest.tt. | ||
Tooltool | Tooltool is build on https://api.pub.build.mozilla.org/tooltool/ and to find the uploaded file you can search after : Filename,SHA512 hash,Upload author or Upload message (including bug number). | ||
example: search after "mitmproxy" | |||
The tooltool download servers are simply apache server folders with a flat structure (all files are stored at root level with no subfolders). | The tooltool download servers are simply apache server folders with a flat structure (all files are stored at root level with no subfolders). | ||
| Line 71: | Line 66: | ||
== The tooltool cache == | == The tooltool cache == | ||
This has been implemented in bug [https://bugzilla.mozilla.org/show_bug.cgi?id=858635 https://bugzilla.mozilla.org/show_bug.cgi?id=858635] | This has been implemented in bug [https://bugzilla.mozilla.org/show_bug.cgi?id=858635 https://bugzilla.mozilla.org/show_bug.cgi?id=858635] | ||
All the bellow examples are used for the older packages that are on "http://tooltool.pub.build.mozilla.org/temp-sm-stuff" url. | |||
When connecting to a tooltool server to fetch a file, it is now possible to use a local cache specifying the local cache folder with the -c option, e.g.: | When connecting to a tooltool server to fetch a file, it is now possible to use a local cache specifying the local cache folder with the -c option, e.g.: | ||
| Line 118: | Line 113: | ||
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''. | 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. | 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.Also make sure the "file" is in the same repository from where you run tooltool. | ||
python tooltool.py upload "file" --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. | 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. | ||
edits