diff --git a/engine/src/flutter/.cirrus.yml b/engine/src/flutter/.cirrus.yml index 1f9e1e6b505..17dafd5cc2f 100644 --- a/engine/src/flutter/.cirrus.yml +++ b/engine/src/flutter/.cirrus.yml @@ -3,13 +3,15 @@ gcp_credentials: ENCRYPTED[987a78af29b91ce8489594c9ab3fec21845bbe5ba68294b8f6def # LINUX task: gke_container: - image: gcr.io/flutter-cirrus/build-engine-image:latest - cluster_name: build-32-cluster - zone: us-central1-a - namespace: default - cpu: 30 # can't use all 30-cores; system pods needs cores too - memory: 100Gb # similarly, can't use all 100Gb memory + dockerfile: "ci/docker/build/Dockerfile" + builder_image_name: docker-builder # gce vm image + cluster_name: build-32-cluster + zone: us-central1-a + namespace: default + cpu: 30 # can't use all 30-cores; system pods needs cores too + memory: 100Gb # similarly, can't use all 100Gb memory env: + CIRRUS_DOCKER_CONTEXT: "ci/docker/build" CIRRUS_WORKING_DIR: "/tmp/github_repo" ENGINE_PATH: "/tmp/clean_engine" DEPOT_TOOLS: "/tmp/depot_tools" diff --git a/engine/src/flutter/ci/docker/build/README.md b/engine/src/flutter/ci/docker/build/README.md index a4f12e16ca3..79f0d927084 100644 --- a/engine/src/flutter/ci/docker/build/README.md +++ b/engine/src/flutter/ci/docker/build/README.md @@ -4,9 +4,16 @@ building flutter/engine in our CI system (currently [Cirrus](cirrus-ci.org)). In order to run the scripts, you have to setup `docker` and `gcloud`. Please refer to internal doc go/installdocker for how to setup `docker` on gLinux. -After setup, -* edit `Dockerfile` to change how the container image is built. -* run `./build_docker.sh` to build the container image. -* run `./push_docker.sh` to push the image to google cloud registry. This will - affect our CI tests. +Cirrus will build (and cache) a Docker image based on this `Dockerfile` for +Linux tasks using its +[Dockerfile as CI](https://cirrus-ci.org/guide/docker-builder-vm/) feature. +Any change to the `Dockerfile` will cause a new task to be triggered to build +and tag a new version of the Docker image which will be a dependency of the +other Linux tasks. This task will instantiate a new GCP VM based on the image +specified in the `.cirrus.yml` `builder_image_name` field. +To test changes to the Linux `Dockerfile`, create a PR with the changes, and +Cirrus will attempt to build a new image. + +To debug locally, you can build an image with `./build_docker.sh`, but pushing +to the registry is no longer necessary.