From 67789b3a5d07a0379ced45e001e755213436ff2e Mon Sep 17 00:00:00 2001 From: godofredoc Date: Thu, 3 Feb 2022 16:35:14 -0800 Subject: [PATCH] Add dependabot for docker files. (#97556) --- .github/dependabot.yml | 12 ++++++++++++ dev/ci/docker_linux/Dockerfile | 25 ------------------------- dev/ci/docker_linux/README.md | 9 --------- dev/ci/docker_linux/docker_attach.sh | 12 ------------ dev/ci/docker_linux/docker_build.sh | 24 ------------------------ dev/ci/docker_linux/docker_login.sh | 10 ---------- dev/ci/docker_linux/docker_push.sh | 12 ------------ 7 files changed, 12 insertions(+), 92 deletions(-) delete mode 100755 dev/ci/docker_linux/docker_attach.sh delete mode 100755 dev/ci/docker_linux/docker_build.sh delete mode 100755 dev/ci/docker_linux/docker_login.sh delete mode 100755 dev/ci/docker_linux/docker_push.sh diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0c9faf8ae7..07b5d28225 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,3 +15,15 @@ updates: - "team" - "team: infra" - "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" diff --git a/dev/ci/docker_linux/Dockerfile b/dev/ci/docker_linux/Dockerfile index e82fe2b056..6542752edb 100644 --- a/dev/ci/docker_linux/Dockerfile +++ b/dev/ci/docker_linux/Dockerfile @@ -98,33 +98,11 @@ RUN touch ~/.android/repositories.cfg # Add npm to 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 RUN locale-gen en_US "en_US.UTF-8" && DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales 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 RUN apt-get install -y --no-install-recommends \ clang \ @@ -137,6 +115,3 @@ RUN apt-get install -y --no-install-recommends \ xvfb && \ apt-get upgrade -y --no-install-recommends && \ apt-get clean - -RUN bundle config set system 'true' && \ - bundle install --system diff --git a/dev/ci/docker_linux/README.md b/dev/ci/docker_linux/README.md index ebaed3fdca..92b325f2e4 100644 --- a/dev/ci/docker_linux/README.md +++ b/dev/ci/docker_linux/README.md @@ -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 refer to the [internal flutter team doc](go/flutter-team) for how to set up in a 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). diff --git a/dev/ci/docker_linux/docker_attach.sh b/dev/ci/docker_linux/docker_attach.sh deleted file mode 100755 index e68905904c..0000000000 --- a/dev/ci/docker_linux/docker_attach.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 diff --git a/dev/ci/docker_linux/docker_build.sh b/dev/ci/docker_linux/docker_build.sh deleted file mode 100755 index 49faaa32ad..0000000000 --- a/dev/ci/docker_linux/docker_build.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/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" diff --git a/dev/ci/docker_linux/docker_login.sh b/dev/ci/docker_linux/docker_login.sh deleted file mode 100755 index f6b5fb8d41..0000000000 --- a/dev/ci/docker_linux/docker_login.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/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 diff --git a/dev/ci/docker_linux/docker_push.sh b/dev/ci/docker_linux/docker_push.sh deleted file mode 100755 index 152161ec0d..0000000000 --- a/dev/ci/docker_linux/docker_push.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/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"