Tuesday 22 September 2015

Part 3 -- Setup Jenkins and gerrit: Working with gerrit project (User part)

Clone Project:
  • Go to Pojects --> list --> builder --> clone with commit message hook

  • Copy paste "git clone ..." command to your terminal.
    Note: Please make sure that you already have added your ssh keys to gerrit.
Push patchsets:
Once you have your project cloned to your local machine. Its time to start contributing.
  • Go inside project directory.
  • Create job_script.sh
    #!/bin/bash
    
    echo "I am alive."
    
  • Issue following git commands to push patchset
    git status -s 
    git add job_scripts.sh
    git commit -m "Adding job script" --signoff
    git commit --amend --signoff 
    git push origin HEAD:refs/for/master
    
Review Changes:

  • You can review any pushed changes by going to address <gerrit_ip>:8080.
  • Go to All --> Open. You can see your recently committed code here.


  • Click on your commit. Click any file to review the code.

Merge Changes:
Since you have rights to merge the code. You can do so.
  • Click Code-Review+2 --> Submit.


No comments:

Post a Comment