CodeForPhilly / chime

COVID-19 Hospital Impact Model for Epidemics
https://codeforphilly.github.io/chime/
MIT License
205 stars 151 forks source link

Refactor deployment workflows based on GitHub Releases #538

Closed lottspot closed 4 years ago

lottspot commented 4 years ago

This change set heavily refactors the automated deployment workflow to circumvent challenges with using GitHub actions for CD and to more closely match the current development release process. The workflow implemented is as follows:

This workflow will allow the development team to perform releases without any intervention from the ops unit. Working examples of workflow steps:

lottspot commented 4 years ago

Note on changes to tagging conventions:

This PR sets the repository tag to :latest for the chime container image. Each new prod release will be pushed with a :latest tag in addition to its version tag. This will allow the repo version to safely remain labeled :latest, while still revving the active tag version on the cluster with each deploy.

themightychris commented 4 years ago

@lottspot incredible work! The only thing that could make this better is publishing deployment records (you could use deployments and their events to mediate the workflow, but that might be more trouble than it's worth. I think just creating the records against the ref being deployed and updating its status throughout the workflow will give us deployment status in the PR GUI and a sep slack event)

Edit: this one might be more appropriate: https://github.com/unacast/actions-github-deployment-status

lottspot commented 4 years ago

Deployments API integration has been added in f17c5d3. Working examples:

And the resulting deployment objects

MooseQuest commented 4 years ago

I reread this with a clearer mind -- One that I like is the fact we are building the github package, making it available to pull done. This is excellent indeed.