Skip to content

wikimedia/labs-tools-guc

master
Switch branches/tags
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Global user contributions

Getting started

Requires Composer and PHP 7.2 or later.

~/git/guc $ chmod 775 cache/
~/git/guc $ composer install --no-dev
~/git/guc $ php -S localhost:9223

Local development

You can use the following patch to stub the database and render some of the response UI locally.

# src/App.php
    protected function openDB($host, $dbname = null) {
        return new class() {
            public function prepare(string $query) {
                return new class() {
                    public function bindParam() {
                    }
                    public function execute() {
                    }
                    public function fetchAll() {
                        return [];
                    }
                };
            }
        };
    }

Toolforge management

See also:

Installation

$ ssh tools-login.wmflabs.org

[email protected]$ become my-tool-here

[email protected]:~$ git clone … git-guc
[email protected]:~$ ln -s git-guc public_html
[email protected]:~$ webservice --backend=kubernetes php7.2 start
[email protected]:~$ webservice shell

[email protected]:~$ cd git-guc
[email protected]:git-guc$ chmod 775 cache/
[email protected]:git-guc$ composer install --no-dev

Deploy changes

$ ssh tools-login.wmflabs.org

[email protected]$ become guc

[email protected]:~$ webservice shell

[email protected]:~$ cd git-guc
[email protected]:git-guc$ git pull
[email protected]:git-guc$ composer update --no-dev