From f7b22c1ce246ad2656afacf28a2458a2c16ac0d7 Mon Sep 17 00:00:00 2001 From: Ricardo Amador <32242716+ricardoamador@users.noreply.github.com> Date: Thu, 4 Aug 2022 16:52:29 -0700 Subject: [PATCH] Move firebase test lab logs to a staging bucket (#35149) * Updated the bucket for firebase testing to the staging project. * updated the project. * Adding environment variables for gcp project and storage bucket. * Updated to exit if environment variables were not provided. --- ci/firebase_testlab.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ci/firebase_testlab.py b/ci/firebase_testlab.py index 36b5d419b6471..92069a7c1f584 100755 --- a/ci/firebase_testlab.py +++ b/ci/firebase_testlab.py @@ -11,7 +11,16 @@ import subprocess import sys -BUCKET = 'gs://flutter_firebase_testlab' +if 'STORAGE_BUCKET' not in os.environ: + print('The GCP storage bucket must be provided as an environment variable.') + sys.exit(1) +BUCKET = os.environ['STORAGE_BUCKET'] + +if 'GCP_PROJECT' not in os.environ: + print('The GCP project must be provided as an environment variable.') + sys.exit(1) +PROJECT = os.environ['GCP_PROJECT'] + script_dir = os.path.dirname(os.path.realpath(__file__)) buildroot_dir = os.path.abspath(os.path.join(script_dir, '..', '..')) out_dir = os.path.join(buildroot_dir, 'out') @@ -28,7 +37,7 @@ def run_firebase_test(apk, results_dir): [ 'gcloud', '--project', - 'flutter-infra', + PROJECT, 'firebase', 'test', 'android',