roughly, the idea would be:
- Have an application that lives on WMCS or on Toolforge
- Listen for comments (e.g. "stage this") from whitelisted contributors in gerrit
- If on WMCS, find a free port or use nginx-proxy/traefik, use docker run to run a Quibble image, without running tests, and probably just with a SQLite DB, and with an entrypoint command that will keep the container running for 30 minutes, then post a comment to gerrit with the URL where the staged changes can be reviewed. We probably don't want to provide the admin password or allow file uploads, but maybe it doesn't matter if a malicious user gets access to the shell since quibble image doesn't use a root user?
- If on Toolforge, run quibble without Docker, using SQLite as the backend DB; find a free port, and create a directory based on the gerrit patch short number, so the URL for accessing the staged site would be something like tools.wmflabs.org/{name-of-the-project}/{gerrit-short-change-id}:{port}. We would need some scripts to shut down the PHP built-in web server and clean up the directory after 30 minutes.
We'd probably also want a tool that can generate a .env file for quibble's use based on a gerrit change. That could probably be a command baked into quibble (quibble --generate-env {url-to-gerrit-change})
The advantage of building this around quibble is that it's the same tool already used for CI, so the people doing QA can know that the web environment they are looking at is the same one that had tests which passed.
We'd probably also want to be able to somehow surface the logs from browsing the site, especially to look for PHP notices / warnings / errors. Conceivably the clean up script could grep the log file for that particular instance and then report back to gerrit with any notices/warnings/errors.
Because of how we do configuration management and the lack of content, this isn't going to be a perfect solution by any means, but it would probably help with the code review and QA process.
See also T234643#5558658 and related discussion / notes.
From T76245 see: