mozilla-services / contile

This is the back-end server for the Mozilla Tile Service (MTS)
https://mozilla-services.github.io/contile/
Mozilla Public License 2.0
19 stars 2 forks source link

[DISCO-2277] Deploy stage and production images to Docker Hub #550

Closed taddes closed 1 year ago

taddes commented 1 year ago

References

JIRA: DISCO-2277 GitHub: #TODO

Description

In order to facilitate stage and production deployments, as well as to allow contributors to opt-in to load testing on the deployment pipeline, create distinctive Docker Hub publication jobs in the CircleCI workflow.

Enable signalization to Jenkins via Docker tag assignment, using the following convention:

^(?P<environment>stage|prod)(?:-(?P<task>\w+)-(?P<onfailure>warn|abort))?-(?P<commit>[a-z0-9]+)$

Example Docker image tag name:

image-20230228-152205

The load test signal is established using text in a git commit. The text should take the form [load test: (abort|warn)].

The abort text will prevent a prod deployment should the load test fail.

The warn text will output a Slack warning should the load test fail, but still allow for the production deployment.

Example commit text:

feat: Add feature ABC [load test: warn]

feat: Add feature XYZ [load test: abort]

Resources

Example: Merino CI workflows

Acceptance Criteria

SRE is informed of this modification and deployment is coordinated

Replace the existing deploy job with two jobs: docker-image-publish-stage and docker-image-publish-prod

The docker-image-publish-stage job is responsible for assigning the stage Docker tag and pushing the image to Docker Hub.

Assignment of the stage tag includes parsing for the load test commit message.

The docker-image-publish-prod job is responsible for assigning the prod and latest Docker tags and pushing the images to Docker Hub.

The guideline, the PULL_REQUEST_TEMPLATE.md and any other relevant documentation is updated

PR Review Checklist

Put an x in the boxes that apply

taddes commented 1 year ago

Thanks for the useful context @Trinaa , we should be good to go given the process requirements!