tree: 5ef0834608b669495db933b1d80a0d7427a32e88 [path history] [tgz]
  1. go/
  2. build_docker_release
  4. Dockerfile
  6. Makefile

Docker Pushes Watcher

Docker pushes watcher is an app that with new task drivers and new bots has replaced Google Cloud Build for Skia. The tracking bug for this work was skbug/9514.

Previous Cloud Build framework

Skia used to trigger builds on Google Cloud's Cloud Build framework using this cloudbuild.yaml file.

Using cloud build, the “skia-release” and “skia-wasm-release” images were created and pushed per commit in the Skia repository. The “infra” image was created and pushed per commit in the Buildbot repository.

Additionally cloudbuild.yaml created and pushed new images for various apps like fiddler, skottie, particles, debugger, etc.

The continuous-deploy app then ran pushk on those apps and deployed them to k8s.

Replacement framework with Task Drivers and Docker Pushes Watcher app

The Cloud build framework worked but did not use Skia infra framework and was thus difficult to see failures and diagnose problems. The framework was replaced with task drivers and the docker-pushes-watcher app. Now all failures when building apps cause the corresponding bots to turn red on for the commits that break things, this makes failures much easier to find for the sheriff. Failures in the docker-pushes-watcher app show up as alerts for the trooper to diagnose and fix.

Task Drivers

A task driver was written to build and push a specified docker image (build_push_docker_image).

The following bots were then created in the different repositories:

These bots could run out of order because of backfilling. Due to this the “Docker Pushes Watcher” app (described below) calculates which image is the most recent and then tags it with the “prod” tag.

Task Drivers were also written to create and push Docker images of various apps that depend on the “” and “” images:

The following bots were created using the above task drivers:

All above task drivers send a pubsub message when a docker image is created and pushed.

Docker Pushes Watcher App

The docker pushes watcher app listens for pubsub messages for 2 main tasks:

  • Tags images in the app's whitelist with the “prod” tag when they correspond to the latest commit in the Skia/Buildbot repository. This is done to account for bots running out of order because of backfilling.
  • Deploys apps to k8s using pushk for images in the app's whitelist when they correspond to the latest commit.

Auto-deploying infra apps

A task driver has been written to build and push images of infra apps (push_apps_from_infra_image). The task driver sends a pubsub message after the image is built, the docker_pushes_watcher app then pushks those apps.

The following steps will add new apps to the auto-deploying framework:

  • Add a new method to the task_driver, similar to buildPushCTImage.
  • Add the app to the docker_pushs_watcher yaml file (example).