Update RTD Gerrit job to check GERRIT_* variables 10/6910/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 16 Oct 2017 17:14:07 +0000 (13:14 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 16 Oct 2017 17:27:22 +0000 (13:27 -0400)
This allows the job to handle branch '*' more easily..

Change-Id: I65ef5886af59ec85841734f03bfac781194f780a
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
.jjb-test/expected-xml/gerrit-rtd-rtd-verify-master
jjb/lf-rtd-jobs.yaml

index 4760427..3d8f493 100644 (file)
@@ -81,14 +81,14 @@ For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
     <userRemoteConfigs>
       <hudson.plugins.git.UserRemoteConfig>
         <name>origin</name>
-        <refspec/>
+        <refspec>$GERRIT_REFSPEC</refspec>
         <url>$GIT_URL/$PROJECT</url>
         <credentialsId>test-credential</credentialsId>
       </hudson.plugins.git.UserRemoteConfig>
     </userRemoteConfigs>
     <branches>
       <hudson.plugins.git.BranchSpec>
-        <name>refs/heads/master</name>
+        <name>refs/heads/$GERRIT_BRANCH</name>
       </hudson.plugins.git.BranchSpec>
     </branches>
     <excludedUsers/>
index 9feaec1..8e9def9 100644 (file)
 
     scm:
       - lf-infra-gerrit-scm:
-          branch: '{branch}'
+          branch: '$GERRIT_BRANCH'
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
           git-url: '{git-url}'
-          refspec: ''
+          refspec: '$GERRIT_REFSPEC'
           submodule-recursive: '{submodule-recursive}'
           choosing-strategy: default