Presently the image version comes from /srv/mediawiki-staging/scap/image-build/report.json on the deployment host. That file is updated as part of the release process, so maintenance scripts run with the most recent build.
Two things about that:
- Occasionally we'll want to specify an image version, so mwscript-k8s should have a flag to override it. That's straightforward. (Done.)
- mwscript-k8s always runs scripts in the active DC, no matter which deployment host is used. So maintenance script users can almost forget about picking the right DC. But last-build is only updated on the active deployment host. It would be nice if we fetched the default image version from somewhere central.