Skip to content

Web app: Workflow

qedk edited this page Aug 24, 2020 · 3 revisions

The homepage is a simple landing page with handy links to status pages, repository and licensing information. It has an endpoint open to receiving POST requests (deploy/).

The POST request is validated with -

  • If webhook_secret is defined in secrets.yaml, its signature is validated, or else,
  • JSON schema, travis-ci slug, master head commit's SHA verification and if the check was successful, then
    • The bot restarts the Kubernetes deployments of goodbot and ircbot (if a valid config is not loaded, it errors out at this step).

Issues

There is a minor lag between stopping and starting the deployments but it's relatively minor but required since Kubernetes has no safe way of instantly recreating deployments. Owing to how Flask deals with requests, it's not possible to send a response back in a non-blocking manner, which means GitHub doesn't get a 200 code back but that's not a problem (it simply times out).