Add docker container generation scripts (flutter/engine#5898)

These scripts generate the image we used to test flutter/engine in Cirrus.
This commit is contained in:
liyuqian
2018-07-30 10:40:45 -07:00
committed by GitHub
parent 8ab84e5f85
commit 8d64f93386
6 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1 @@
This directory includes scripts and tools for continuous integration tests.

View File

@@ -0,0 +1,25 @@
FROM ubuntu:14.04
ENV DEPOT_TOOLS_PATH $HOME/depot_tools
ENV ENGINE_PATH $HOME/engine
RUN apt-get update
RUN apt-get install -y git wget curl unzip python lsb-release sudo
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $DEPOT_TOOLS_PATH
ENV PATH $PATH:$DEPOT_TOOLS_PATH
RUN mkdir --parents $ENGINE_PATH
WORKDIR $ENGINE_PATH
ADD engine_gclient .gclient
RUN gclient sync
WORKDIR $ENGINE_PATH/src
RUN ./build/install-build-deps.sh --no-prompt
RUN ./build/install-build-deps-android.sh --no-prompt
WORKDIR $HOME/dart
RUN wget https://storage.googleapis.com/dart-archive/channels/dev/release/2.0.0-dev.63.0/sdk/dartsdk-linux-x64-release.zip
RUN unzip dartsdk-linux-x64-release.zip
ENV PATH $PATH:$HOME/dart/dart-sdk/bin

View File

@@ -0,0 +1,13 @@
This directory includes scripts to build the docker container image used for
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 the [internal flutter team doc](go/flutter-team) for how to setup in a
Google internal environment.
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.

View File

@@ -0,0 +1,7 @@
#!/bin/bash
# pull to make sure we are not rebuilding for nothing
docker pull gcr.io/flutter-cirrus/build-engine-image:latest
docker build --tag gcr.io/flutter-cirrus/build-engine-image:latest .

View File

@@ -0,0 +1,7 @@
solutions = [{
"name" : "src/flutter",
"url" : "https://github.com/flutter/engine.git",
"deps_file" : "DEPS",
"managed" : False,
"safesync_url": "",
}]

View File

@@ -0,0 +1,4 @@
#!/bin/bash
docker push gcr.io/flutter-cirrus/build-engine-image:latest