Page MenuHomePhabricator

Continuous delivery of Banner code to meta
Open, LowPublic

Description

To avoid outdated Banner code on meta and to work with our developer tools we need a software to synchronize the GitHub banner code repository with the JS pages on meta.

Requirements/Constraints:

  • Editing banners on meta has heavy security constrains, allowing an automated user to deploy code would have to have the same permission scruity for all banner authors that members of the CN group have, Since this is a major process, the MVP is to automate repetitive steps of banner creation and deployment. Changes to banners and campaigns will then be "edited" by each developer with his own credentials
  • We only want to change files on meta that have changed during a commit.

Notes for the estimation and viability:
Creating a campaign and 2 banners takes about 5 minutes for an experienced developer. Add 2 more minutes for revising the banners (copying the code for the new banner version) after the first feedback loop. At ~50 campaigns during campaign season this makes for ~6 hours of banner update time during campaign season. Setting up/developing software for banner deployment should not take longer than those 6 hours.

Event Timeline

It's not only meta but also the CMS wiki that holds the contents for wikipedia.de. See this github issue: https://github.com/wmde/fundraising/issues/1086

If you want to have wiki pages edited by your actual users you could also have a script run locally that edits relevant pages using API's action=edit. Script would have your credentials somewhere and do edits as yourself.
This is basically the same thing as with the link to form you enter your username and password but more automatic (for my taste): don't have to enter passwords (two different username/password pairs, actually) every time, you can run it from command line without even touching a mouse or a browser etc.

Or if you wanted to have it fully automatic you could add some mapping from github usernames to wiki usernames. Once github merges the commit the webhook would be fired. Triggered script would map the username of the guy who merged the PR to wiki username, read wiki credentials from the secret file, and do API as this user. But this will be leaking your passwords kind of, unless done some super magic way. So unfortunately some manual step will be needed.

Or you can always push straight into master without doing github pull requests, and have local git post-push hook that would run wiki-editting script as a right user (will be run on the machine of the person who pushed). Just kidding with this "suggestion", of course.

Aklapper renamed this task from Sychronize Banner code to meta to Synchronize Banner code to meta.Oct 12 2016, 10:20 AM
gabriel-wmde renamed this task from Synchronize Banner code to meta to Continuous delivery of Banner code to meta.Oct 24 2019, 5:56 PM
gabriel-wmde updated the task description. (Show Details)