From 5dcfefe2b6a8946f02c7bfac2fd641b0a6a3356b Mon Sep 17 00:00:00 2001 From: Nick Shirley Date: Fri, 9 May 2025 18:04:11 -0600 Subject: [PATCH] fix(infra): configure gcp utils before upload (#1698) - Move authentication setup for GCP into upload command - Update name to be more descriptive for gcs upload - Update references to use new name and remove redundant GCP authentication setup Closes STOR-255 --- .circleci/config.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 82ea71d8..4e6f40ac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -158,7 +158,7 @@ commands: environment: SYNCSTORAGE_RS_IMAGE: app:build - upload-to-gcs: + gcs-configure-and-upload: parameters: source: type: string @@ -168,6 +168,10 @@ commands: type: enum enum: ["xml", "json"] steps: + - gcp-cli/setup: + google_project_id: ETE_GOOGLE_PROJECT_ID + gcloud_service_key: ETE_GCLOUD_SERVICE_KEY + google_project_number: ETE_GOOGLE_PROJECT_NUMBER - run: name: Upload << parameters.source >> << parameters.extension >> Files to GCS when: always # Ensure the step runs even if previous steps, like test runs, fail @@ -247,10 +251,6 @@ jobs: MYSQL_DATABASE: syncstorage resource_class: large steps: - - gcp-cli/setup: - google_project_id: ETE_GOOGLE_PROJECT_ID - gcloud_service_key: ETE_GCLOUD_SERVICE_KEY - google_project_number: ETE_GOOGLE_PROJECT_NUMBER - checkout - display-versions - setup-python @@ -268,11 +268,11 @@ jobs: # then run-tokenserver-scripts-tests will fail. These tests expect the db to be # configured already, and it appears unit-tests modify the db to the expected state - store-test-results - - upload-to-gcs: + - gcs-configure-and-upload: source: workflow/test-results destination: gs://ecosystem-test-eng-metrics/syncstorage-rs/junit extension: xml - - upload-to-gcs: + - gcs-configure-and-upload: source: workflow/test-results destination: gs://ecosystem-test-eng-metrics/syncstorage-rs/coverage extension: json @@ -432,7 +432,7 @@ jobs: - run-e2e-tests: db: mysql - store-test-results - - upload-to-gcs: + - gcs-configure-and-upload: source: workflow/test-results destination: gs://ecosystem-test-eng-metrics/syncstorage-rs/junit extension: xml @@ -461,7 +461,7 @@ jobs: - run-e2e-tests: db: spanner - store-test-results - - upload-to-gcs: + - gcs-configure-and-upload: source: workflow/test-results destination: gs://ecosystem-test-eng-metrics/syncstorage-rs/junit extension: xml