aboutsummaryrefslogtreecommitdiffstats
path: root/moonv4
diff options
context:
space:
mode:
authorRHE <rebirthmonkey@gmail.com>2017-12-14 13:35:47 +0100
committerRHE <rebirthmonkey@gmail.com>2017-12-14 13:35:47 +0100
commit4f052c7a3dce7fac431e84c2d6100e2169383ad8 (patch)
tree66c95efc81f3aa4b052368fc051921788e11467b /moonv4
parente15677c4370f3f54b7818a5378fa6ec889e1b6a1 (diff)
add gerrit tuto
Change-Id: I9a499bb013eb0a8e6970b07359115791b378a8a8 Signed-off-by: RHE <rebirthmonkey@gmail.com>
Diffstat (limited to 'moonv4')
-rw-r--r--moonv4/DEV.md50
1 files changed, 47 insertions, 3 deletions
diff --git a/moonv4/DEV.md b/moonv4/DEV.md
index 70bcc4fc..f9864639 100644
--- a/moonv4/DEV.md
+++ b/moonv4/DEV.md
@@ -1,6 +1,50 @@
-# Build Python Packages and Docker Images
-
-## Python Package
+# Developer Tutorial
+
+## Gerrit Setup
+### Git Install
+- `sudo apt-get install git`
+- `git config --global user.email "example@wikimedia.org"`
+- `git config --global user.name "example"`
+
+### ssh key
+- `cd ~/.ssh`
+- `ssh-keygen -t rsa -C your_email@youremail.com`
+- `~/.ssh/id_rsa`: identification (private) key`
+- `~/.ssh/id_rsa.pub`: public key
+- copy the public key to Gerrit web
+- add Gerrit web上 entry to `~/.ssh/known_hosts`
+- eval `ssh-agent`: start ssh-agent
+- `ssh-add ~/.ssh/id_rsa`: add private key to ssh
+- `ssh -p 29418 <USERNAME>@gerrit.opnfv.org`: test
+
+### Gerrit clone
+- `git clone https://WuKong@gerrit.opnfv.org:29418/moon`
+- the password is dynamically generated on the Gerrit web
+
+### Gerrit Setting
+- `sudo apt-get install python-pip`
+- `sudo pip install git-review`
+- `git remote add gerrit ssh://<yourname>@gerrit.opnfv.org:29418/moon.git`
+- add the ssh public key to the Gerrit web
+- `git review –s`: test the Gerrit review connection
+
+### Gerrit-Review
+- git add XXX
+- git commit --signoff --all
+- git review
+
+### Review Correction
+- `git clone https://git.openstack.org/openstack/oslo-specs`
+- `cd oslo-specs`
+- `git fetch https://git.openstack.org/openstack/oslo-specs refs/changes/43/492543/1 && git checkout FETCH_HEAD`
+- `git checkout -b 492543-1`
+- `vi specs/policy/external-pdp.rst`
+- `git add specs/policy/external-pdp.rst`
+- `git commit –amend`
+- `git review`
+
+
+## Build Python Package
### pre-requist
Get the code
```bash