[PATCH docs v4] Add Gerrit server info to contributing doc

OpenBMC Patches openbmc-patches at stwcx.xyz
Wed Jul 6 00:00:15 AEST 2016


From: Adriana Kobylak <anoo at us.ibm.com>

Add steps to setup and push changes to the openbmc gerrit server.

Signed-off-by: Adriana Kobylak <anoo at us.ibm.com>
---
 contributing.md | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/contributing.md b/contributing.md
index db485a0..ecd3834 100644
--- a/contributing.md
+++ b/contributing.md
@@ -84,6 +84,46 @@ The guidelines in the Linux kernel are very useful:
 
 Your contribution will generally need to be reviewed before being accepted.
 
+
+Submitting changes via Gerrit server
+------------------------------------
+
+The openbmc gerrit server supports Gihub credentials, its link is:
+  https://gerrit.openbmc-project.xyz/#/q/status:open
+
+One time setup: Login to the WebUI with your github credentials and verify on
+your account Settings that your SSH keys were imported:
+  https://gerrit.openbmc-project.xyz/#/settings/
+
+Most repositories are supported by the gerrit server, the current list can be
+found under Projects -> List:
+  https://gerrit.openbmc-project.xyz/#/admin/projects/
+
+If you're going to be working with gerrit often, it's useful to create an SSH
+host block in ~/.ssh/config. Ex:
+```
+Host openbmc.gerrit
+        Hostname gerrit.openbmc-project.xyz
+        Port 29418
+        User your_github_id
+```
+
+From your openbmc git repository, add a remote to the gerrit server, where
+_openbmc_repo_ is the current git repository you're working on, such as
+phosphor-rest-server, and _openbmc.gerrit_ is the name of the Host added to
+.ssh/config in the previous step:
+  `git remote add gerrit ssh://your_github_id@openbmc.gerrit/openbmc/openbmc_repo`
+
+Obtain the git hook commit-msg to automatically add a Change-Id to the commit
+message, which is needed by gerrit:
+  `gitdir=$(git rev-parse --git-dir)`
+  `scp -p -P 29418 your_github_id at gerrit.openbmc-project.xyz:hooks/commit-msg ${gitdir}/hooks`
+
+To submit a change set, commit your changes, and push to the gerrit server,
+where _gerrit_ is the name of the remote added with the git remote add command:
+  `git push gerrit HEAD:refs/for/master`
+
+
 Avoid references to non-public resources
 ----------------------------------------
 
-- 
2.9.0




More information about the openbmc mailing list