Hashar has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/87059


Change subject: get-mw-core now fallback on git.wikimedia.org
......................................................................

get-mw-core now fallback on git.wikimedia.org

On labs we do not have a local replication of mediawiki/core, instead
fallback to git.wikimedia.org.

Change-Id: I37ff7884df542aba23d1db57dbcdb12362e9b180
---
M macro.yaml
1 file changed, 10 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/59/87059/1

diff --git a/macro.yaml b/macro.yaml
index 156ee39..fc5a5ab 100644
--- a/macro.yaml
+++ b/macro.yaml
@@ -52,8 +52,16 @@
         - shell: |
             #!/bin/bash -xe
             # Snapshot `remotes/origin/{branch}` in the job workspace
-            git archive --remote=/var/lib/git/mediawiki/core.git {branch} \
-                | (cd "$WORKSPACE" && tar xf -)
+            GIT_LOCAL="/var/lib/git/mediawiki/core.git"
+            if [ test -d "$GIT_LOCAL" ]; then
+                # Fetch from local Gerrit replication
+                git archive --remote=/var/lib/git/mediawiki/core.git {branch} \
+                    | (cd "$WORKSPACE" && tar xf -)
+            else
+                # Fallback to git.wikimedia.org
+                curl 
'https://git.wikimedia.org/zip/?r=mediawiki/core.git&format=gz' \
+                    | (cd "$WORKSPACE" && tar xzf -)
+            fi
 
 - builder:
     name: jshint-in

-- 
To view, visit https://gerrit.wikimedia.org/r/87059
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37ff7884df542aba23d1db57dbcdb12362e9b180
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to