Unverified Commit 67789b3a authored by godofredoc's avatar godofredoc Committed by GitHub

Add dependabot for docker files. (#97556)

parent c412d7b0
...@@ -15,3 +15,15 @@ updates: ...@@ -15,3 +15,15 @@ updates:
- "team" - "team"
- "team: infra" - "team: infra"
- "waiting for tree to go green" - "waiting for tree to go green"
- package-ecosystem: "docker"
directory: "/dev/ci/docker_linux"
schedule:
interval: "weekly"
reviewers:
- "keyonghan"
- "yusufm"
- "fujino"
labels:
- "team"
- "team: infra"
- "waiting for tree to go green"
...@@ -98,33 +98,11 @@ RUN touch ~/.android/repositories.cfg ...@@ -98,33 +98,11 @@ RUN touch ~/.android/repositories.cfg
# Add npm to path. # Add npm to path.
ENV PATH="/usr/bin:${PATH}" ENV PATH="/usr/bin:${PATH}"
RUN dpkg-query -L nodejs
# Install Firebase
# This is why we need nodejs installed.
RUN /usr/bin/npm --verbose install -g firebase-tools@10.1.2
# Install golang more recent than in repo (necessary for dashing to build)
RUN curl 'https://dl.google.com/go/go1.13.3.linux-amd64.tar.gz' | tar xvz
ENV GOBINARY=/go/bin/go
# Install dashing
RUN mkdir -p /opt/gopath/bin
ENV GOPATH=/opt/gopath
ENV PATH="${GOPATH}/bin:${PATH}"
RUN $GOBINARY get -u github.com/technosophos/dashing
# Set locale to en_US # Set locale to en_US
RUN locale-gen en_US "en_US.UTF-8" && DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales RUN locale-gen en_US "en_US.UTF-8" && DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
ENV LANG en_US.UTF-8 ENV LANG en_US.UTF-8
# Install fastlane via pinned Gemfile & Gemfile.lock
# Skip all the documentation (-N) since it's just on CI.
RUN gem install bundler -N
# Gemfile last edited 1/6/2019 (update to trigger a rebuild of Docker image)
COPY ci/docker_linux/Gemfile /Gemfile
COPY ci/docker_linux/Gemfile.lock /Gemfile.lock
# Install dependencies for desktop flutter run # Install dependencies for desktop flutter run
RUN apt-get install -y --no-install-recommends \ RUN apt-get install -y --no-install-recommends \
clang \ clang \
...@@ -137,6 +115,3 @@ RUN apt-get install -y --no-install-recommends \ ...@@ -137,6 +115,3 @@ RUN apt-get install -y --no-install-recommends \
xvfb && \ xvfb && \
apt-get upgrade -y --no-install-recommends && \ apt-get upgrade -y --no-install-recommends && \
apt-get clean apt-get clean
RUN bundle config set system 'true' && \
bundle install --system
...@@ -4,12 +4,3 @@ building flutter/flutter in our CI system (currently [Cirrus](cirrus-ci.org)). ...@@ -4,12 +4,3 @@ building flutter/flutter in our CI system (currently [Cirrus](cirrus-ci.org)).
To run the scripts, you have to set up `docker` and `gcloud`. Please To run the scripts, you have to set up `docker` and `gcloud`. Please
refer to the [internal flutter team doc](go/flutter-team) for how to set up in a refer to the [internal flutter team doc](go/flutter-team) for how to set up in a
Google internal environment. Google internal environment.
To debug the image locally:
* (Optional) edit the `Dockerfile` to change how the container image is built.
* Run `./docker_build.sh` to build the container image (`sudo` permission is
required)
* Run `./docker_attach.sh` to start a container from the image and attach to its
internal bash shell. From here, you can invoke shell commands from the
`.cirrus.yml` (you will have to manually run any `setup` steps; e.g. the
container will not have the Flutter repo cloned yet).
#!/usr/bin/env bash
# Copyright 2014 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
TAG="${CIRRUS_TAG:-latest}"
# Starts an interactive docker container with a bash shell running in it, and
# attaches the user's shell to it.
sudo docker run --interactive --tty \
"gcr.io/flutter-cirrus/build-flutter-image:$TAG" \
/bin/bash
#!/usr/bin/env bash
# Copyright 2014 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Capture the directory this script resides in
SCRIPT_DIRECTORY="$(dirname $(readlink -f "$0"))"
# Set context to flutter/dev
CONTEXT="${SCRIPT_DIRECTORY}/../.."
TAG="${CIRRUS_TAG:-latest}"
# Convert "+" to "-" to make hotfix tags legal Docker tag names.
# See https://docs.docker.com/engine/reference/commandline/tag/
TAG=${TAG/+/-}
# pull to make sure we are not rebuilding for nothing
sudo docker pull "gcr.io/flutter-cirrus/build-flutter-image:$TAG"
sudo docker build "$@" \
--tag "gcr.io/flutter-cirrus/build-flutter-image:$TAG" \
--file "$SCRIPT_DIRECTORY/Dockerfile" \
"$CONTEXT"
#!/usr/bin/env bash
# Copyright 2014 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
if [[ -n "$CIRRUS_CI" && -n "$GCLOUD_CREDENTIALS" ]]; then
echo "$GCLOUD_CREDENTIALS" | base64 --decode | docker login -u _json_key --password-stdin https://gcr.io
else
gcloud auth print-access-token | sudo docker login -u oauth2accesstoken --password-stdin https://gcr.io
fi
#!/usr/bin/env bash
# Copyright 2014 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
TAG="${CIRRUS_TAG:-latest}"
# Convert "+" to "-" to make hotfix tags legal Docker tag names.
# See https://docs.docker.com/engine/reference/commandline/tag/
TAG=${TAG/+/-}
sudo docker push "gcr.io/flutter-cirrus/build-flutter-image:$TAG"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment