jenkins-bot has submitted this change and it was merged.

Change subject: extension: set MW_INSTALL_PATH to WORKSPACE when unset
......................................................................


extension: set MW_INSTALL_PATH to WORKSPACE when unset

The Wikidata extension has its extensions under
/extensions/Wikidata/vendor/* .. That causes a bunch of issues when
using relative paths.

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

Approvals:
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/macro.yaml b/macro.yaml
index 55e917e..8d0d1ad 100644
--- a/macro.yaml
+++ b/macro.yaml
@@ -230,15 +230,22 @@
           dependencies: '{dependencies}'
      - shell: |
         #!/bin/bash -xe
-        # Inject in LocalSettings.php some code to automatically load
-        # installed extensions.
+        # Inject in LocalSettings.php some code...
+
+        # .. MW_INSTALL_PATH points to WORKSPACE
+        # WATCHOUT: curly braces need to be escaped, JJB pass string to 
format()
+        echo "if( ! getenv( 'MW_INSTALL_PATH' ) ) {{ putenv( 
'MW_INSTALL_PATH='. getenv( 'WORKSPACE' ) ); }}" \
+        >> "$WORKSPACE/LocalSettings.php"
 
         # XXX: be careful, need to escape $ !!!
         #
         echo -e "\$wgWikimediaJenkinsCI = true;\n" \
         >> "$WORKSPACE/LocalSettings.php"
+
+        # .. automatically load installed extensions.
         echo "require_once( '/var/lib/jenkins/tools/extensions-loader.php' );" 
\
         >> "$WORKSPACE/LocalSettings.php"
+
      - mw-run-update-script
 
 - builder:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ad86e694963098f2a98cbca0abec9eed29bc9c1
Gerrit-PatchSet: 2
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar <has...@free.fr>
Gerrit-Reviewer: Addshore <addshorew...@gmail.com>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to