Skip to content

Commit

Permalink
Switch to Cirrus Dockerfile as CI (flutter#13440)
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherfujino authored Nov 7, 2019
1 parent 6fd58ed commit 075eae5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
14 changes: 8 additions & 6 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
17 changes: 12 additions & 5 deletions ci/docker/build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 075eae5

Please sign in to comment.