title: Multiple jenkins/gerrit projects
body: <p>We're finishing the setup of our new CI system, including git, gerrit and jenkins for automated testing and code reviews, and we're finding a strange situation:</p>
  <p>We have three different gerrit projects, each one of them with its own Jenkins job. We used <a href="http://unethicalblogger.com/2009/12/07/code-review-with-gerrit-a-mostly-visual-guide.html" rel="nofollow noreferrer">this</a> guide as setup reference, and everything is installed and apparently working fine.</p>
  <p>Our first project was setup, and tested with a sample change patch. Jenkins was triggered correctly, passed the test and voted &quot;Verified&quot; to the build as expected. So far so good!</p>
  <p>But: When we tried to setup a second project, we find that a change patch in one of the projects triggers changed in every jenkins job. For example:</p>
  <p>Let's say we have GerritProjectA, and GerritProjectB, each one with a JenkinsProjectA and JenkinsProjectB. When a change is submitted to GerritProjectA, both JenkinsProjectA and JenkinsProjectB are triggered. Also, something gets mixed up in the gerrit voting after the build: This is the info in sshd_log after one of the builds (one in JenkinsProjectB):</p>
  <pre><code>gerrit approve 10,3 --message '\''Build Failed 
      http://jenkins-server:8080/job/projectA/6/ : FAILURE
  
      http://jenkins-server:8080/job/projectB/59/ : Correcto'\!''\'' --
          verified -2 --code-review 0' 14ms 6ms 1
  </code></pre>
  <p>As you can see, the gerrit approve command is mixed up with information for two different jenkins jobs...</p>
  <p>Sample setup for any jenkins job:</p>
  <pre><code>Repository URL: ssh://jenkins@gerrit-server:29418/projectA.git
  Banches to build: $GERRIT_PATCHSET_REVISION
  Build triggered by Gerrit event:
  Project Type: Plain
  Branches: Path **
  </code></pre>
  <p>Software versions:</p>
  <pre><code>Jenkins: 1.458
  Gerrit plugin: 2.5.1
  Gerrit: 2-3 rc0
  </code></pre>
  <p>Any ideas? Thanks in advance!</p>
  <p>Domingo</p>