Fix GIT_BASE for cloning standalone repos 65/5565/2
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Tue, 5 Jan 2016 10:24:57 +0000 (11:24 +0100)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Tue, 5 Jan 2016 10:28:58 +0000 (10:28 +0000)
GIT_BASE is set to <git_url>/<project> in default macros.
In order not to cause issues for other parts of the job and the script,
a new parameter GIT_CLONE_BASE has been introduced in order to clone repos
for composite doc generation.

Change-Id: I8ce0ea1e5324ce947a674b013cf7d169e6a9defe
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
jjb/opnfvdocs/opnfvdocs.yml

index 25e546b..b6b0b1c 100644 (file)
             project: $GERRIT_PROJECT
         - gerrit-parameter:
             branch: '{branch}'
+        - string:
+            name: GIT_CLONE_BASE
+            default: ssh://gerrit.opnfv.org:29418
+            description: "Used for overriding the GIT URL coming from parameters macro."
 
     scm:
         - gerrit-trigger-scm:
             project: $GERRIT_PROJECT
         - gerrit-parameter:
             branch: '{branch}'
+        - string:
+            name: GIT_CLONE_BASE
+            default: ssh://gerrit.opnfv.org:29418
+            description: "Used for overriding the GIT URL coming from parameters macro."
         - string:
             name: GS_URL
             default: '$GS_BASE{gs-pathname}'
             name: GS_URL
             default: '$GS_BASE{gs-pathname}'
             description: "Directory where the build artifact will be located upon the completion of the build."
+        - string:
+            name: GIT_CLONE_BASE
+            default: ssh://gerrit.opnfv.org:29418
+            description: "Used for overriding the GIT URL coming from parameters macro."
         - string:
             name: GERRIT_BRANCH
             default: '{branch}'
             # clone releng repo to get repo list
             cd $WORKSPACE
             echo "Cloning releng repo"
-            git clone $GIT_BASE/releng --quiet
+            git clone $GIT_CLONE_BASE/releng --quiet
 
             # clone rest of the repos and checkout the branch
             echo "Cloning repos of participating OPNFV Projects and checking out $GERRIT_BRANCH"
             for repo in $(grep -v '^#' $WORKSPACE/releng/jjb/opnfvdocs/project.cfg | sort); do
                 cd $WORKSPACE
                 echo "    $repo"
-                git clone $GIT_BASE/$repo --branch $GERRIT_BRANCH --quiet
+                git clone $GIT_CLONE_BASE/$repo --branch $GERRIT_BRANCH --quiet
             done
             echo "--------------------------------------------------------"
             echo