All CI/CD automation in this project is executed via GitHub Actions, whose workflow files live in this directory.
While we're using GCP Composer, "deployment" of Airflow consists of two parts:
- Calling
gcloud composer environments update ...
to update the Composer environment with new (or specific versions of) packages - Copying the
dags
andplugins
folders to a GCS bucket that Composer reads (this is specified in the Composer Environment)
This workflow builds a static website from the Svelte app and deploys it to Netlify.
Workflows prefixed with build-
generally lint, test, and (usually) publish either a Python package or a Docker image.
Workflows prefixed with service-
deal with Kubernetes deployments.
service-release-candidate.yml
creates candidate branches, using hologit to bring in external Helm charts and remove irrelevant (i.e. non-infra) codeservice-release-diff.yml
renders kubectl diffs on PRs targeting release branchesservice-release-channel.yml
deploys to a given channel (i.e. environment) on updates to a release branch
Some of these workflows use hologit or invoke. See the READMEs in .holo and ci for documentation regarding hologit and invoke, respectively.
The workflows described above also define their triggers. In general, developer workflows should follow these steps.
- Check out a feature branch
- Put up a PR for that feature branch, targeting
main
service-release-candidate
will run and create a remote branch namedcandidate/<feature-branch-name
- Create and merge a PR from the candidate branch to
releases/test
service-release-diff
will run on the PR and print the expected changesservice-release-channel
will run on merge (i.e. push onreleases/test
) and deploy
- Merge the original PR
service-release-candidate
will then update the remotecandidates/main
branch
- Create and merge a PR from
candidates/main
toreleases/prod
service-release-channel
will run and deploy toprod
this time
Note: One alternative would be to use candidates/main
to deploy into both test
and prod
. This is very possible but can be a bit annoying if GitHub is configured to delete branches on merge and the cleanup-release-candidates
action then deletes candidates/main
after it has been merged into releases/test
.