Switch to Cirrus Dockerfile as CI (flutter/engine#13440)

This commit is contained in:
Christopher Fujino
2019-11-07 15:37:07 -08:00
committed by GitHub
parent d024332cdf
commit c54d4e4eff
2 changed files with 20 additions and 11 deletions

View File

@@ -3,13 +3,15 @@ gcp_credentials: ENCRYPTED[987a78af29b91ce8489594c9ab3fec21845bbe5ba68294b8f6def
# LINUX # LINUX
task: task:
gke_container: gke_container:
image: gcr.io/flutter-cirrus/build-engine-image:latest dockerfile: "ci/docker/build/Dockerfile"
cluster_name: build-32-cluster builder_image_name: docker-builder # gce vm image
zone: us-central1-a cluster_name: build-32-cluster
namespace: default zone: us-central1-a
cpu: 30 # can't use all 30-cores; system pods needs cores too namespace: default
memory: 100Gb # similarly, can't use all 100Gb memory cpu: 30 # can't use all 30-cores; system pods needs cores too
memory: 100Gb # similarly, can't use all 100Gb memory
env: env:
CIRRUS_DOCKER_CONTEXT: "ci/docker/build"
CIRRUS_WORKING_DIR: "/tmp/github_repo" CIRRUS_WORKING_DIR: "/tmp/github_repo"
ENGINE_PATH: "/tmp/clean_engine" ENGINE_PATH: "/tmp/clean_engine"
DEPOT_TOOLS: "/tmp/depot_tools" DEPOT_TOOLS: "/tmp/depot_tools"

View File

@@ -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 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. refer to internal doc go/installdocker for how to setup `docker` on gLinux.
After setup, Cirrus will build (and cache) a Docker image based on this `Dockerfile` for
* edit `Dockerfile` to change how the container image is built. Linux tasks using its
* run `./build_docker.sh` to build the container image. [Dockerfile as CI](https://cirrus-ci.org/guide/docker-builder-vm/) feature.
* run `./push_docker.sh` to push the image to google cloud registry. This will Any change to the `Dockerfile` will cause a new task to be triggered to build
affect our CI tests. 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.