From c8af6057c0855b4ee6295c0a4587d4a3212848f9 Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Mon, 21 Nov 2016 12:08:43 -0500 Subject: [PATCH 01/11] Add Google Cloud SDK --- Dockerfile | 19 +++++++++++++++++++ system_report.sh | 1 + 2 files changed, 20 insertions(+) diff --git a/Dockerfile b/Dockerfile index bd1a4d0..50fc4e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -111,6 +111,25 @@ RUN mvn --version RUN gem install fastlane --no-document RUN fastlane --version +# ------------------------------------------------------ +# --- Install Google Cloud SDK +# --- https://github.com/GoogleCloudPlatform/cloud-sdk-docker/blob/master/Dockerfile +# --- https://firebase.google.com/docs/test-lab/command-line + +# Install the Google Cloud SDK. +ENV HOME / +ENV CLOUDSDK_PYTHON_SITEPACKAGES 1 +RUN wget https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.zip && unzip google-cloud-sdk.zip && rm google-cloud-sdk.zip + +# Install beta for Firebase Test Lab +RUN google-cloud-sdk/install.sh --usage-reporting=true --path-update=true --bash-completion=true --rc-path=/.bashrc --additional-components beta + +RUN google-cloud-sdk/bin/gcloud config set --installation component_manager/disable_update_check true +RUN sed -i -- 's/\"disable_updater\": false/\"disable_updater\": true/g' /google-cloud-sdk/lib/googlecloudsdk/core/config.json + +RUN mkdir /.ssh +ENV PATH /google-cloud-sdk/bin:$PATH + # ------------------------------------------------------ # --- Cleanup and rev num diff --git a/system_report.sh b/system_report.sh index 9bcadbf..7516e54 100644 --- a/system_report.sh +++ b/system_report.sh @@ -23,6 +23,7 @@ ver_line="$(gradle --version | grep 'Gradle ')" ; echo "* Gradle: $ver_line" ver_line="$(mvn --version | grep 'Apache Maven')" ; echo "* Maven: $ver_line" ver_line="$(fastlane --version | grep 'fastlane ')" ; echo "* Fastlane: $ver_line" ver_line="$( javac -version 2>&1 )" ; echo "* Java: $ver_line" +ver_line="$( gcloud version )" ; echo "* gcloud: $ver_line" echo "========================================" echo From baf9fe612672139e2517b76ab7d82dbded645dd3 Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Mon, 21 Nov 2016 12:34:43 -0500 Subject: [PATCH 02/11] Don't change HOME --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 50fc4e0..7df56a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -117,7 +117,6 @@ RUN fastlane --version # --- https://firebase.google.com/docs/test-lab/command-line # Install the Google Cloud SDK. -ENV HOME / ENV CLOUDSDK_PYTHON_SITEPACKAGES 1 RUN wget https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.zip && unzip google-cloud-sdk.zip && rm google-cloud-sdk.zip From 92320358f1deb8390d743ad32b3e05183a277ef0 Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Mon, 21 Nov 2016 13:49:23 -0500 Subject: [PATCH 03/11] Install via apt --- Dockerfile | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7df56a5..c99bee0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -116,18 +116,13 @@ RUN fastlane --version # --- https://github.com/GoogleCloudPlatform/cloud-sdk-docker/blob/master/Dockerfile # --- https://firebase.google.com/docs/test-lab/command-line -# Install the Google Cloud SDK. -ENV CLOUDSDK_PYTHON_SITEPACKAGES 1 -RUN wget https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.zip && unzip google-cloud-sdk.zip && rm google-cloud-sdk.zip +RUN echo "deb https://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \ + && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - \ + && sudo apt-get update -qq \ + && sudo apt-get install -y -qq --no-install-recommends google-cloud-sdk -# Install beta for Firebase Test Lab -RUN google-cloud-sdk/install.sh --usage-reporting=true --path-update=true --bash-completion=true --rc-path=/.bashrc --additional-components beta - -RUN google-cloud-sdk/bin/gcloud config set --installation component_manager/disable_update_check true -RUN sed -i -- 's/\"disable_updater\": false/\"disable_updater\": true/g' /google-cloud-sdk/lib/googlecloudsdk/core/config.json - -RUN mkdir /.ssh -ENV PATH /google-cloud-sdk/bin:$PATH +RUN /usr/bin/gcloud config set --installation component_manager/disable_update_check true +RUN sed -i -- 's/\"disable_updater\": false/\"disable_updater\": true/g' /usr/lib/google-cloud-sdk/lib/googlecloudsdk/core/config.json # ------------------------------------------------------ # --- Cleanup and rev num From 5b4d7bb04cc88258a0599833c501c31997c0472a Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Mon, 21 Nov 2016 13:49:57 -0500 Subject: [PATCH 04/11] Install recommended packages also --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c99bee0..70daec8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -119,7 +119,7 @@ RUN fastlane --version RUN echo "deb https://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \ && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - \ && sudo apt-get update -qq \ - && sudo apt-get install -y -qq --no-install-recommends google-cloud-sdk + && sudo apt-get install -y -qq google-cloud-sdk RUN /usr/bin/gcloud config set --installation component_manager/disable_update_check true RUN sed -i -- 's/\"disable_updater\": false/\"disable_updater\": true/g' /usr/lib/google-cloud-sdk/lib/googlecloudsdk/core/config.json From d8a1f7b67f391c16957b98f6d9804b71c944b590 Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Mon, 21 Nov 2016 13:50:59 -0500 Subject: [PATCH 05/11] Add doc link --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 70daec8..7229358 100644 --- a/Dockerfile +++ b/Dockerfile @@ -115,6 +115,7 @@ RUN fastlane --version # --- Install Google Cloud SDK # --- https://github.com/GoogleCloudPlatform/cloud-sdk-docker/blob/master/Dockerfile # --- https://firebase.google.com/docs/test-lab/command-line +# --- https://cloud.google.com/sdk/downloads?hl=sr#linux RUN echo "deb https://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \ && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - \ From 34a8da89e2cde6913253343a15d30048bfe52ca6 Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Mon, 21 Nov 2016 13:51:41 -0500 Subject: [PATCH 06/11] Set CLOUD_SDK_REPO --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 7229358..4a2c009 100644 --- a/Dockerfile +++ b/Dockerfile @@ -117,6 +117,8 @@ RUN fastlane --version # --- https://firebase.google.com/docs/test-lab/command-line # --- https://cloud.google.com/sdk/downloads?hl=sr#linux +ENV CLOUD_SDK_REPO="cloud-sdk-xenial" + RUN echo "deb https://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \ && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - \ && sudo apt-get update -qq \ From 20105ec2c884c4d794f21e2359cbab318f35d5dc Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Mon, 21 Nov 2016 14:00:13 -0500 Subject: [PATCH 07/11] Disable usage reporting --- Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4a2c009..cfd459d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -117,15 +117,20 @@ RUN fastlane --version # --- https://firebase.google.com/docs/test-lab/command-line # --- https://cloud.google.com/sdk/downloads?hl=sr#linux -ENV CLOUD_SDK_REPO="cloud-sdk-xenial" +ENV CLOUD_SDK_REPO cloud-sdk-xenial RUN echo "deb https://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \ && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - \ && sudo apt-get update -qq \ && sudo apt-get install -y -qq google-cloud-sdk +ENV CLOUD_SDK_CONFIG /usr/lib/google-cloud-sdk/lib/googlecloudsdk/core/config.json + RUN /usr/bin/gcloud config set --installation component_manager/disable_update_check true -RUN sed -i -- 's/\"disable_updater\": false/\"disable_updater\": true/g' /usr/lib/google-cloud-sdk/lib/googlecloudsdk/core/config.json +RUN sed -i -- 's/\"disable_updater\": false/\"disable_updater\": true/g' $CLOUD_SDK_CONFIG + +RUN /usr/bin/gcloud config set --installation core/disable_usage_reporting true +RUN sed -i -- 's/\"disable_usage_reporting\": false/\"disable_usage_reporting\": true/g' $CLOUD_SDK_CONFIG # ------------------------------------------------------ # --- Cleanup and rev num From 173ecb761d7c38d53023f2e14eb1af88958172ff Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Mon, 21 Nov 2016 14:03:28 -0500 Subject: [PATCH 08/11] Update system report --- system_report.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system_report.sh b/system_report.sh index 7516e54..ce598cb 100644 --- a/system_report.sh +++ b/system_report.sh @@ -23,7 +23,7 @@ ver_line="$(gradle --version | grep 'Gradle ')" ; echo "* Gradle: $ver_line" ver_line="$(mvn --version | grep 'Apache Maven')" ; echo "* Maven: $ver_line" ver_line="$(fastlane --version | grep 'fastlane ')" ; echo "* Fastlane: $ver_line" ver_line="$( javac -version 2>&1 )" ; echo "* Java: $ver_line" -ver_line="$( gcloud version )" ; echo "* gcloud: $ver_line" +gcloud version # Lists all gcloud components echo "========================================" echo From 4a935a771d24af7994655a7f85510be9ab665e8e Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Mon, 21 Nov 2016 14:09:47 -0500 Subject: [PATCH 09/11] Avoid hard coding the Ubuntu distro --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index cfd459d..4e0e282 100644 --- a/Dockerfile +++ b/Dockerfile @@ -117,9 +117,7 @@ RUN fastlane --version # --- https://firebase.google.com/docs/test-lab/command-line # --- https://cloud.google.com/sdk/downloads?hl=sr#linux -ENV CLOUD_SDK_REPO cloud-sdk-xenial - -RUN echo "deb https://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \ +RUN echo "deb https://packages.cloud.google.com/apt cloud-sdk-`lsb_release -c -s` main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \ && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - \ && sudo apt-get update -qq \ && sudo apt-get install -y -qq google-cloud-sdk From b6b8c5e955688047854cfd6de86f7b4a3d874b63 Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Mon, 21 Nov 2016 14:24:58 -0500 Subject: [PATCH 10/11] Add comment about config.json --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 4e0e282..eb7bce9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -124,6 +124,7 @@ RUN echo "deb https://packages.cloud.google.com/apt cloud-sdk-`lsb_release -c -s ENV CLOUD_SDK_CONFIG /usr/lib/google-cloud-sdk/lib/googlecloudsdk/core/config.json +# gcloud config doesn't update config.json. See upstream Dockerfile for details. RUN /usr/bin/gcloud config set --installation component_manager/disable_update_check true RUN sed -i -- 's/\"disable_updater\": false/\"disable_updater\": true/g' $CLOUD_SDK_CONFIG From 5ddf405859de1e83fc1264c5f083e881c15994f0 Mon Sep 17 00:00:00 2001 From: bootstraponline Date: Mon, 21 Nov 2016 15:02:26 -0500 Subject: [PATCH 11/11] Move gcloud to new section --- system_report.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/system_report.sh b/system_report.sh index ce598cb..16b85d7 100644 --- a/system_report.sh +++ b/system_report.sh @@ -23,11 +23,16 @@ ver_line="$(gradle --version | grep 'Gradle ')" ; echo "* Gradle: $ver_line" ver_line="$(mvn --version | grep 'Apache Maven')" ; echo "* Maven: $ver_line" ver_line="$(fastlane --version | grep 'fastlane ')" ; echo "* Fastlane: $ver_line" ver_line="$( javac -version 2>&1 )" ; echo "* Java: $ver_line" -gcloud version # Lists all gcloud components echo "========================================" echo +echo +echo "=== Google Cloud components ============" +gcloud version +echo "========================================" +echo + echo echo "=== Testing Android tools ==============" echo " * adb path:"