Confirmed users
79
edits
(→Permissions: added is_staff for triggering all missing and missing talos jobs) |
|||
| Line 10: | Line 10: | ||
* LDAP account, for signing in to Treeherder and pushing commits to the source code repositories. | * LDAP account, for signing in to Treeherder and pushing commits to the source code repositories. | ||
* [https://www.mozilla.org/en-US/firefox/new/ A modern browser], to access [[Sheriffing/How:To:Treeherder|Treeherder]], [https://bugzilla.mozilla.org Bugzilla], and other Mozilla web tools. | * [https://www.mozilla.org/en-US/firefox/new/ A modern browser], to access [[Sheriffing/How:To:Treeherder|Treeherder]], [https://bugzilla.mozilla.org Bugzilla], and other Mozilla web tools. | ||
=== Set up Mozilla SSH Key, mercurial and mozilla-unified repo, test push to try === | |||
Mozilla has a server for testing patches before they are pushed to the integration repos. Practically, every developer can test their patch without breaking the repo. | |||
You can test the functionality of a patch by creating the job in treeherder using Mercurial. | |||
<u>'''''For that the following need to be done:'''''</u> | |||
<br /> | |||
<span style="color:#FF0000">'''IF YOU DO NOT HAVE A SSH KEY'''</span> in https://login.mozilla.com/ssh_keys_index then: | |||
*Generate a new ssh key for Mozilla. Preferably, the key should be generated in a new Ubuntu virtual machine (VM). | |||
*After you created the VM User in Ubuntu, log in that account with putty and generate the private and public keys using the following command: <code>ssh-keygen -t rsa -b 4096 -C "Mozilla key"</code>. <span style="color:#14866d">The above command will generate '''id_rsa''' and '''id_rsa.pub''' in '''''~user/.ssh/''''' </span> | |||
*At ''Enter passphrase'' you need to type in a password which you will not forget! | |||
*After generating the key, the content of '''id_rsa.pub''' needs to be added here: https://login.mozilla.com/ssh_keys_index . If you ''already have a key'', make sure the '''public one''' is in https://login.mozilla.com/ssh_keys_index and the '''private one''' in the new Ubuntu user, in '''id_rsa'''. | |||
*After creating/setting the key, create the following file '''~user/.ssh/config''' and add the following lines (in the email section add your Mozilla email address): | |||
**Host hg.mozilla.org | |||
**User user@mozilla.com | |||
===== Installing Mercurial ===== | |||
Mozilla recommends using the latest Mercurial version. We’ll need to install it. If you have any other version installed you can '''uninstall''' it with '''apt-get remove mercurial''' and install the new version using the following commands (with root): | |||
*<code> apt-get install python-pip -y </code> | |||
*<code> pip install Mercurial </code> | |||
===== Setting up the mozilla-unified repo ===== | |||
Now that you have Mercurial installed, we will make a ''clone'' of ''mozilla-unified''. | |||
<br /> | |||
Log out of root, remain on your new user account and run the following command in the home of your current user: <code>hg clone --uncompressed https://hg.mozilla.org/mozilla-unified </code>. | |||
Wait until the download is finished (about 5-10 min) and the ''mozilla-unified folder'' will be created. | |||
===== Setting up Mercurial for Mozilla ===== | |||
*After Mozilla-Unified has been downloaded, access the folder (<code>cd mozilla-unified</code>) and run the below command: <code>./mach mercurial-setup</code>. | |||
*In the <span style="color:#14866d">name</span> and <span style="color:#14866d">email</span> sections, type your <span style="color:#14866d">Mozilla account details</span>, for all other questions just answer <span style="color:#14866d">Y</span>. | |||
*After you’ve finished the above setup, <span style="color:#14866d">'''download .hgrc.txt'''</span> file and save it in <span style="color:#14866d">'''/home/user'''</span> under the name <span style="color:#14866d">'''.hgrc'''</span> . Overwrite the file with the existing one and '''edit it''': type your '''name''' and '''surname''' and your '''Mozilla user''' in the '''username section'''. Also, in the lower part of the file, type only your username. | |||
*Access the mozilla-unified folder and '''download''' ''autoland'' repo using this command: <code>hg pull autoland</code> | |||
*After the above command finished downloading autoland, '''edit''' <span style="color:#14866d">'''.hg/firefoxtrees'''</span> and '''delete''' all the lines <span style="color:#FF0000">'''except'''</span> '''autoland, inbound, central, active esrs (check the ones available on Treeherder), beta and release.''' | |||
<br /> | |||
<span style="color:#14866d">Note: If only AUTOLAND is in that file, you need to run the following command: <code>hg pull beta && hg pull central && hg pull inbound && hg pull esr</code></span> | |||
<br /> | |||
If you’ve come this far, you only need to run the following commands: | |||
*<code>hg pull fxtrees</code> | |||
*<code>hg update <repo></code> <span style="color:#14866d">//repo = autoland/inbound/central/esr/release/beta</span> | |||
===== Test push to try repo ===== | |||
After the '''setup''' is '''finished''', run the following '''test''' command: <code>./mach try -b o -p linux -u mochitest-1 -t none</code> | |||
<br /><span style="color:#14866d">'''!after a change of ssh keys, if you hit the following error when pushing to try:''' <span style="color:#FF0000">Remote: sign_and_send_pubkey: signing failed: agent refused operation</span> '''then you’ll need to delete the current ssh agent and add the new one using these commands:'''</span> | |||
*<code>ssh -add -d</code> | |||
*<code>ssh -add</code> | |||
<span style="color:#14866d">Afterwards you can run <code>./mach try -b o -p linux -u mochitest-1 -t none</code></span> | |||
<br /> | |||
This command will '''create a push in treeherder''', and if all goes well, that push will appear here: https://treeherder.mozilla.org/#/jobs?repo=try . | |||
The output of the test should look like this: | |||
<pre> | |||
./mach try -b o -p linux -u mochitest-1 -t none | |||
Creating temporary commit for remote... | |||
pushing to ssh://hg.mozilla.org/try | |||
Enter passphrase for key '/home/arny/.ssh/id_rsa': | |||
searching for changes | |||
remote: adding changesets | |||
remote: adding manifests | |||
remote: adding file changes | |||
remote: added 1 changesets with 0 changes to 0 files (+1 heads) | |||
remote: recorded push in pushlog | |||
remote: | |||
remote: View your change here: | |||
remote: https://hg.mozilla.org/try/rev/a9e732c8d4df66b2961f476652765ab451dcdeae | |||
remote: | |||
remote: Follow the progress of your build on Treeherder: | |||
remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=a9e732c8d4df66b2961f476652765ab451dcdeae | |||
remote: recorded changegroup in replication log in 0.008s | |||
push complete | |||
temporary commit removed, repository restored | |||
</pre> | |||
= The Sheriffs How-To = | = The Sheriffs How-To = | ||