<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 29, 2014 at 4:20 AM, Ondrej Wisniewski <span dir="ltr"><<a href="mailto:ondrej.wisniewski@dektech.com.au" target="_blank">ondrej.wisniewski@dektech.com.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>Hi Ricardo,<br>
      <br>
      thanks a lot for your help and detailed instructions. It will
      surely come in handy when I will need to do something like that. I
      am looking also into this possibility.<br>
      <br>
      But the actual reason I need to sync our central developer repo
      with the Gerrit repo is a problem when the developer tries to
      submit code for review to Gerrit. Since the central developer repo
      is periodically updated from upstream and the developers pull
      these changes into their own local repos before branching off the
      feature branch, then this feature branch contains commits from
      upstream that Gerrit doesn't know about. So submitting this
      feature branch to code review will include lots of commits which
      are not the developers.<br>
      <br>
      I have now solved this issue by granting each developer the right
      to push the master branch to refs/heads/master in the Gerrit repo.
      This makes sure that the Gerrit repos master branch is updated
      with the latest commits and when the developer submits his feature
      branch for review, only his own commits will be reviewed.<br></div></div></blockquote><div><br></div><div>I've been following the conversation, probably like many others, wondering why in the world you need such a complicated, high-maintenance workflow? What's the use case? Why can't your developers use <a href="http://review.openstack.org">review.openstack.org</a>? In your first email, you used the phrase "t<span style="font-family:Helvetica,Arial,sans-serif;font-size:13px">rying to set up an OpenStack development workflow in our company" but what you're building is not an OpenStack development workflow at all - it's an expensive private island. The community's workflow is quite well documented here: </span><font face="Helvetica, Arial, sans-serif"><a href="https://wiki.openstack.org/wiki/Gerrit_Workflow">https://wiki.openstack.org/wiki/Gerrit_Workflow</a></font></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"><div>
      <br>
      Regards, Ondrej<div><div class="h5"><br>
      <br>
      <i>On 10/27/2014 05:11 PM, Ricardo Carrillo Cruz wrote:</i><i><br>
      </i></div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">I think what you are trying to achieve is to have a
        branch that tracks upstream for the upstream projects, and
        another branch that tracks local development in your Gerrit
        project.
        <div>You may want to check Jeepyb:</div>
        <div><br>
        </div>
        <div><a href="http://ci.openstack.org/jeepyb.html" target="_blank">http://ci.openstack.org/jeepyb.html</a><br>
        </div>
        <div><br>
        </div>
        <div>That tool is what Openstack CI uses to manage gerrit repo
          creation.</div>
        <div>Let's take as an example that you wanted to have
          python-neutronclient project in your Gerrit, that tracks
          upstream.</div>
        <div><br>
        </div>
        <div>You would do something like this:</div>
        <div><br>
        </div>
        <div>1. Install jeepyb and configure the projects.ini file
          according to your environment.</div>
        <div>1. Add python-neutronclient.config file to the folder your
          manage-projects expect it to find (acl-dir parameter from
          previous step), with contents similar to :</div>
        <div><br>
        </div>
        <div>
          <div>[access "refs/heads/*"]                                  
                                                                       
                                                                       
                                       </div>
          <div>abandon = group neutron-core                            
                                                                       
                                                                       
                                        </div>
          <div>label-Code-Review = -2..+2 group neutron-core            
                                                                       
                                                                       
                                       </div>
          <div>label-Workflow = -1..+1 group neutron-core              
                                                                       
                                                                       
                                        </div>
          <div>                                                         
                                                                       
                                                                       
                                       </div>
          <div>[access "refs/heads/proposed/*"]                        
                                                                       
                                                                       
                                        </div>
          <div>abandon = group neutron-milestone                        
                                                                       
                                                                       
                                       </div>
          <div>label-Code-Review = -2..+2 group neutron-milestone      
                                                                       
                                                                       
                                        </div>
          <div>label-Workflow = -1..+1 group neutron-milestone          
                                                                       
                                                                       
                                       </div>
          <div>                                                         
                                                                       
                                                                       
                                       </div>
          <div>[access "refs/tags/*"]                                  
                                                                       
                                                                       
                                        </div>
          <div>pushSignedTag = group neutron-release                    
                                                                       
                                                                       
                                       </div>
          <div>                                                         
                                                                       
                                                                       
                                       </div>
          <div>[receive]                                                
                                                                       
                                                                       
                                       </div>
          <div>requireChangeId = true                                  
                                                                       
                                                                       
                                        </div>
          <div>requireContributorAgreement = true                      
                                                                       
                                                                       
                                        </div>
          <div>                                                         
                                                                       
                                                                       
                                       </div>
          <div>[submit]                                                
                                                                       
                                                                       
                                        </div>
          <div>mergeContent = true </div>
        </div>
        <div><br>
        </div>
        <div>2. Create an entry in gerrit/projects.yaml file from
          project-config repo like:</div>
        <div><br>
        </div>
        <div>
          <div>- project: openstack/python-neutronclient                
                                                                       
                                                                       
                                       </div>
          <div>  upstream: <a href="https://git.openstack.org/openstack/python-neutronclient" target="_blank">https://git.openstack.org/openstack/python-neutronclient</a>
                                                                       
                                                                       
                            </div>
          <div>  options:                                              
                                                                       
                                                                       
                                        </div>
          <div>    - track-upstream  </div>
        </div>
        <div><br>
        </div>
        <div>3. Run 'manage-projects python-neutronclient'</div>
        <div><br>
        </div>
        <div>After this, the tool would create the project
          'python-neutronclient' with the acl defined from step 1 and
          set it to track upstream (as per the option depicted on step
          2).</div>
        <div>After this, you could just create branches off master from
          the Gerrit UI (or define them upfront in the acl in step 1,
          but this way would get you started faster).</div>
        <div><br>
        </div>
        <div>If you use the upstream openstack_project::review.pp
          manifest the configuration to get this going is greatly
          reduced (it's a mega manifest that installs gerrit, jeepyb and
          other things), I can help you with that.</div>
        <div><br>
        </div>
        <div>Regards</div>
      </div>
    </blockquote>
  </div></div></div>

<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div></div>