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:
1
engine/src/flutter/ci/README.md
Normal file
1
engine/src/flutter/ci/README.md
Normal file
@@ -0,0 +1 @@
|
||||
This directory includes scripts and tools for continuous integration tests.
|
||||
25
engine/src/flutter/ci/docker/build/Dockerfile
Normal file
25
engine/src/flutter/ci/docker/build/Dockerfile
Normal 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
|
||||
|
||||
13
engine/src/flutter/ci/docker/build/README.md
Normal file
13
engine/src/flutter/ci/docker/build/README.md
Normal 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.
|
||||
|
||||
7
engine/src/flutter/ci/docker/build/build_docker.sh
Executable file
7
engine/src/flutter/ci/docker/build/build_docker.sh
Executable 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 .
|
||||
|
||||
7
engine/src/flutter/ci/docker/build/engine_gclient
Normal file
7
engine/src/flutter/ci/docker/build/engine_gclient
Normal file
@@ -0,0 +1,7 @@
|
||||
solutions = [{
|
||||
"name" : "src/flutter",
|
||||
"url" : "https://github.com/flutter/engine.git",
|
||||
"deps_file" : "DEPS",
|
||||
"managed" : False,
|
||||
"safesync_url": "",
|
||||
}]
|
||||
4
engine/src/flutter/ci/docker/build/push_docker.sh
Executable file
4
engine/src/flutter/ci/docker/build/push_docker.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker push gcr.io/flutter-cirrus/build-engine-image:latest
|
||||
|
||||
Reference in New Issue
Block a user