From a333e71d9f627799dcdbfbaaa3baef4afa0fbea4 Mon Sep 17 00:00:00 2001 From: Ricardo Amador Date: Wed, 3 Aug 2022 16:50:34 -0700 Subject: [PATCH 1/4] Updated the bucket for firebase testing to the staging project. --- ci/firebase_testlab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/firebase_testlab.py b/ci/firebase_testlab.py index 36b5d419b6471..46f3742f4d01d 100755 --- a/ci/firebase_testlab.py +++ b/ci/firebase_testlab.py @@ -11,7 +11,7 @@ import subprocess import sys -BUCKET = 'gs://flutter_firebase_testlab' +BUCKET = 'gs://flutter_firebase_testlab_staging' 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') From e6efd02e2668b8e3675355f40535f2c96ee91b63 Mon Sep 17 00:00:00 2001 From: Ricardo Amador Date: Wed, 3 Aug 2022 16:52:51 -0700 Subject: [PATCH 2/4] updated the project. --- ci/firebase_testlab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/firebase_testlab.py b/ci/firebase_testlab.py index 46f3742f4d01d..299c7ac3b2ef3 100755 --- a/ci/firebase_testlab.py +++ b/ci/firebase_testlab.py @@ -28,7 +28,7 @@ def run_firebase_test(apk, results_dir): [ 'gcloud', '--project', - 'flutter-infra', + 'flutter-infra-staging', 'firebase', 'test', 'android', From e13ab65c92777028193881158836f134853d1d8a Mon Sep 17 00:00:00 2001 From: Ricardo Amador Date: Thu, 4 Aug 2022 13:34:02 -0700 Subject: [PATCH 3/4] Adding environment variables for gcp project and storage bucket. --- ci/firebase_testlab.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ci/firebase_testlab.py b/ci/firebase_testlab.py index 299c7ac3b2ef3..89cc6866f85af 100755 --- a/ci/firebase_testlab.py +++ b/ci/firebase_testlab.py @@ -11,7 +11,8 @@ import subprocess import sys -BUCKET = 'gs://flutter_firebase_testlab_staging' +BUCKET = os.environ['STORAGE_BUCKET'] +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 +29,7 @@ def run_firebase_test(apk, results_dir): [ 'gcloud', '--project', - 'flutter-infra-staging', + PROJECT, 'firebase', 'test', 'android', From 3b397cd452a2268433958918dae907e7790fb813 Mon Sep 17 00:00:00 2001 From: Ricardo Amador Date: Thu, 4 Aug 2022 14:20:48 -0700 Subject: [PATCH 4/4] Updated to exit if environment variables were not provided. --- ci/firebase_testlab.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ci/firebase_testlab.py b/ci/firebase_testlab.py index 89cc6866f85af..92069a7c1f584 100755 --- a/ci/firebase_testlab.py +++ b/ci/firebase_testlab.py @@ -11,8 +11,16 @@ import subprocess import sys +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')