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

Change subject: set some paths to use $wmfHostnames 'bits' and 'test'
......................................................................


set some paths to use $wmfHostnames 'bits' and 'test'

The asset paths were set slightly differently for beta. Since it is now
properly setting $wmfVersionNumbers to 'master' and that we have
$wmfHostnames['bits'], we can merge beta and production settings for the
following:

    $wgExtensionAssetsPath
    $wgStyleSheetPath
    $wgResourceBasePath

I have introduced $wmfHostnames['test'] pointing to either
test.wikipedia.org or test.wikimedia.beta.wmflabs.org. It is used to set
the above path settings whenever we are in the 'testwiki' context.

Thanks Anomie to have spotted this!

Change-Id: Ib0ba91f624a3b65880ae1a489f9a2c00c440de2d
---
M wmf-config/CommonSettings.php
1 file changed, 8 insertions(+), 18 deletions(-)

Approvals:
  Anomie: Looks good to me, but someone else must approve
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 782bd5d..e2bb20f 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -106,6 +106,7 @@
 case 'labs':
        $wmfHostnames['bits']     = 'bits.beta.wmflabs.org';
        $wmfHostnames['meta']     = 'meta.wikimedia.beta.wmflabs.org';
+       $wmfHostnames['test']     = 'test.wikimedia.beta.wmflabs.org';
        $wmfHostnames['upload']   = 'upload.beta.wmflabs.org';
        $wmfHostnames['wikidata'] = 'wikidata.beta.wmflabs.org';
        break;
@@ -113,6 +114,7 @@
 default:
        $wmfHostnames['bits']   = 'bits.wikimedia.org';
        $wmfHostnames['meta']   = 'meta.wikimedia.org';
+       $wmfHostnames['test']   = 'test.wikipedia.org';
        $wmfHostnames['upload'] = 'upload.wikimedia.org';
        $wmfHostnames['wikidata'] = 'www.wikidata.org';
        break;
@@ -253,25 +255,13 @@
 // New URL scheme
 if ( $wgDBname == 'testwiki' ) {
        // Make testing skin/JS changes easier
-       $wgExtensionAssetsPath = 
"//test.wikipedia.org/w/static-$wmfVersionNumber/extensions";
-       $wgStyleSheetPath = 
"//test.wikipedia.org/w/static-$wmfVersionNumber/skins";
-       $wgResourceBasePath = 
"//test.wikipedia.org/w/static-$wmfVersionNumber"; // This means resources will 
be requested from /w/static-VERSION/resources
+       $wgExtensionAssetsPath = 
"//{$wmfHostnames['test']}/w/static-$wmfVersionNumber/extensions";
+       $wgStyleSheetPath = 
"//{$wmfHostnames['test']}/w/static-$wmfVersionNumber/skins";
+       $wgResourceBasePath = 
"//{$wmfHostnames['test']}/w/static-$wmfVersionNumber"; // This means resources 
will be requested from /w/static-VERSION/resources
 } else {
-       $wgExtensionAssetsPath = 
"//bits.wikimedia.org/static-$wmfVersionNumber/extensions";
-       $wgStyleSheetPath = 
"//bits.wikimedia.org/static-$wmfVersionNumber/skins";
-       $wgResourceBasePath = "//bits.wikimedia.org/static-$wmfVersionNumber"; 
// This means resources will be requested from /static-VERSION/resources
-}
-
-# For labs, override settings just above. This need to be done before
-# extensions so we can not use CommonSettings-labs.php
-if( $wmfRealm == 'labs' ) {
-       # Base path:
-       $wgResourceBasePath    = "//bits.beta.wmflabs.org/static-master";
-
-       # Assets:
-       $wgExtensionAssetsPath = $wgResourceBasePath . "/extensions";
-       $wgStyleSheetPath      = $wgResourceBasePath . "/skins";
-
+       $wgExtensionAssetsPath = 
"//{$wmfHostnames['bits']}/static-$wmfVersionNumber/extensions";
+       $wgStyleSheetPath = 
"//{$wmfHostnames['bits']}/static-$wmfVersionNumber/skins";
+       $wgResourceBasePath = 
"//{$wmfHostnames['bits']}/static-$wmfVersionNumber"; // This means resources 
will be requested from /static-VERSION/resources
 }
 
 $wgStylePath = $wgStyleSheetPath;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0ba91f624a3b65880ae1a489f9a2c00c440de2d
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hashar <has...@free.fr>
Gerrit-Reviewer: Anomie <bjor...@wikimedia.org>
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