Skip to content

Deployment Workflow

Cecilia Wong edited this page May 1, 2024 · 8 revisions

Note

Deployment to Render was previously done at Docker Hub, using its webhook to deploy the master tag image.
However, the webhook is triggered whenever any image is pushed to Docker Hub, not just the one with the master tag, thus triggering unwanted deployments even when no changes are made to the master branch.

GitHub workflow

  • Name: Run Tests and Deploy Run Tests and Deploy
  • Configuration file: test-and-deploy.yaml
  • Triggered by: Push requests to
    • branches
      • master
      • next-version
    • version tags, ie. tags that begin with version-
Workflow: Run tests, deploy and push Docker image

For master:

  1. Run all test cases.
  2. If all tests pass: (the following are executed in parallel)
    • Trigger Render's deploy hook to deploy the webservice.
    • Build a Docker image with tag name latest, and push it to Docker Hub.

For next-version:

  1. Run all test cases.

For version-* tags:

  1. Run all test cases.
  2. If all tests pass, build a Docker image with tag name the same as the Git tag, and push it to Docker Hub.

Clone this wiki locally