From a1602bdc1a118e9aa3bafb61b707fb101d3488db Mon Sep 17 00:00:00 2001 From: gurusai-voleti Date: Wed, 31 Dec 2025 10:46:06 +0000 Subject: [PATCH 1/2] chore: Migrate gsutil usage to gcloud storage --- docs/INSTALLATION.md | 4 ++-- old workflows/workflows/deployment_gke_dev.yaml | 8 ++++---- setup/setup_terraform.sh | 4 ++-- terraform/stages/demo_environment/setup.bash | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md index aa6ef6740..3b9db1e7d 100644 --- a/docs/INSTALLATION.md +++ b/docs/INSTALLATION.md @@ -77,7 +77,7 @@ terraform apply Ensure that a bucket with the same name as the project has been created: ```commandline -gsutil ls -p "${PROJECT_ID}" +gcloud storage ls --project="${PROJECT_ID}" ``` There should also be a jump host VM in the project: @@ -95,7 +95,7 @@ In this section you successfully created the following: ### Copy bootstrap terraform state to tfstate-bucket ```bash -gsutil cp ../project_bootstrap/terraform.tfstate gs://"${PROJECT_ID}"-tfstate/env/bootstrap/terraform.tfstate +gcloud storage cp ../project_bootstrap/terraform.tfstate gs://"${PROJECT_ID}"-tfstate/env/bootstrap/terraform.tfstate ``` ### Enable deletion protection for the jump host diff --git a/old workflows/workflows/deployment_gke_dev.yaml b/old workflows/workflows/deployment_gke_dev.yaml index d4833d63f..d63c35722 100644 --- a/old workflows/workflows/deployment_gke_dev.yaml +++ b/old workflows/workflows/deployment_gke_dev.yaml @@ -100,7 +100,7 @@ jobs: - name: Download Skaffold cache if exists run: | - gsutil cp $SKAFFOLD_CACHE_GCS ~/.skaffold/ || true + gcloud storage cp $SKAFFOLD_CACHE_GCS ~/.skaffold/ || true - name: Add BQ Tables run: | @@ -121,7 +121,7 @@ jobs: - name: Upload Skaffold cache if: always() run: | - gsutil cp ~/.skaffold/cache $SKAFFOLD_CACHE_GCS + gcloud storage cp ~/.skaffold/cache $SKAFFOLD_CACHE_GCS deploy_documentation: name: Deploy documentation @@ -168,7 +168,7 @@ jobs: - name: Download Skaffold cache if exists run: | - gsutil cp $SKAFFOLD_CACHE_GCS ~/.skaffold/ || true + gcloud storage cp $SKAFFOLD_CACHE_GCS ~/.skaffold/ || true - name: Use Node.js uses: actions/setup-node@v3 @@ -186,6 +186,6 @@ jobs: - name: Upload Skaffold cache if: always() run: | - gsutil cp ~/.skaffold/cache "${SKAFFOLD_CACHE_GCS}/api_docs/cache" + gcloud storage cp ~/.skaffold/cache "${SKAFFOLD_CACHE_GCS}/api_docs/cache" # cookiecutter:endraw \ No newline at end of file diff --git a/setup/setup_terraform.sh b/setup/setup_terraform.sh index 164990d5d..09cfa1388 100644 --- a/setup/setup_terraform.sh +++ b/setup/setup_terraform.sh @@ -39,8 +39,8 @@ create_bucket () { printf "TF_BUCKET_LOCATION=${TF_BUCKET_LOCATION}\n" print_highlight "Creating terraform state bucket: ${TF_BUCKET_NAME}\n" - gsutil mb -l $TF_BUCKET_LOCATION gs://$TF_BUCKET_NAME - gsutil versioning set on gs://$TF_BUCKET_NAME + gcloud storage buckets create gs://$TF_BUCKET_NAME --location $TF_BUCKET_LOCATION + gcloud storage buckets update gs://$TF_BUCKET_NAME --versioning export TF_BUCKET_NAME=$TF_BUCKET_NAME echo } diff --git a/terraform/stages/demo_environment/setup.bash b/terraform/stages/demo_environment/setup.bash index 04693aa4a..5f1ad54b8 100644 --- a/terraform/stages/demo_environment/setup.bash +++ b/terraform/stages/demo_environment/setup.bash @@ -23,7 +23,7 @@ # ----------------------------------------------------------- # Copy bootstrap terraform state to tfstate-bucket -gsutil cp ../project_bootstrap/terraform.tfstate gs://"${PROJECT_ID}"-tfstate/env/bootstrap/terraform.tfstate +gcloud storage cp ../project_bootstrap/terraform.tfstate gs://"${PROJECT_ID}"-tfstate/env/bootstrap/terraform.tfstate # Enable deletion protection for the jump host gcloud compute instances update jump-host --deletion-protection --project="${PROJECT_ID}" From 50bba87553490831618927b6c11a554a2e35fea1 Mon Sep 17 00:00:00 2001 From: gurusai-voleti Date: Wed, 31 Dec 2025 12:26:25 +0000 Subject: [PATCH 2/2] update --- .github/workflows/deployment_gke_dev.yaml | 8 ++++---- .github/workflows/e2e_gke_api_test.yaml | 4 ++-- old workflows/workflows/e2e_gke_api_test.yaml | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deployment_gke_dev.yaml b/.github/workflows/deployment_gke_dev.yaml index 3650e358f..5ef79f76e 100644 --- a/.github/workflows/deployment_gke_dev.yaml +++ b/.github/workflows/deployment_gke_dev.yaml @@ -100,7 +100,7 @@ jobs: - name: Download Skaffold cache if exists run: | - gsutil cp $SKAFFOLD_CACHE_GCS ~/.skaffold/ || true + gcloud storage cp $SKAFFOLD_CACHE_GCS ~/.skaffold/ || true - name: Add BQ Tables run: | @@ -122,7 +122,7 @@ jobs: - name: Upload Skaffold cache if: always() run: | - gsutil cp ~/.skaffold/cache $SKAFFOLD_CACHE_GCS + gcloud storage cp ~/.skaffold/cache $SKAFFOLD_CACHE_GCS # deploy_documentation: # name: Deploy documentation @@ -169,7 +169,7 @@ jobs: # - name: Download Skaffold cache if exists # run: | -# gsutil cp $SKAFFOLD_CACHE_GCS ~/.skaffold/ || true +# gcloud storage cp $SKAFFOLD_CACHE_GCS ~/.skaffold/ || true # - name: Use Node.js # uses: actions/setup-node@v3 @@ -187,6 +187,6 @@ jobs: # - name: Upload Skaffold cache # if: always() # run: | -# gsutil cp ~/.skaffold/cache "${SKAFFOLD_CACHE_GCS}/api_docs/cache" +# gcloud storage cp ~/.skaffold/cache "${SKAFFOLD_CACHE_GCS}/api_docs/cache" # # cookiecutter:endraw diff --git a/.github/workflows/e2e_gke_api_test.yaml b/.github/workflows/e2e_gke_api_test.yaml index ae3379b4b..dbb63cc6d 100644 --- a/.github/workflows/e2e_gke_api_test.yaml +++ b/.github/workflows/e2e_gke_api_test.yaml @@ -140,7 +140,7 @@ jobs: - name: Download Skaffold cache if exists run: | - gsutil cp $SKAFFOLD_CACHE_GCS ~/.skaffold/ || true + gcloud storage cp $SKAFFOLD_CACHE_GCS ~/.skaffold/ || true - name: Set up Kubernetes namespace and Service Account run: | @@ -188,7 +188,7 @@ jobs: - name: Upload Skaffold cache if: always() run: | - gsutil cp ~/.skaffold/cache $SKAFFOLD_CACHE_GCS + gcloud storage cp ~/.skaffold/cache $SKAFFOLD_CACHE_GCS e2e-api-test: runs-on: ubuntu-latest diff --git a/old workflows/workflows/e2e_gke_api_test.yaml b/old workflows/workflows/e2e_gke_api_test.yaml index a3e4100a5..4e5652f7f 100644 --- a/old workflows/workflows/e2e_gke_api_test.yaml +++ b/old workflows/workflows/e2e_gke_api_test.yaml @@ -140,7 +140,7 @@ jobs: - name: Download Skaffold cache if exists run: | - gsutil cp $SKAFFOLD_CACHE_GCS ~/.skaffold/ || true + gcloud storage cp $SKAFFOLD_CACHE_GCS ~/.skaffold/ || true - name: Set up Kubernetes namespace and Service Account run: | @@ -188,7 +188,7 @@ jobs: - name: Upload Skaffold cache if: always() run: | - gsutil cp ~/.skaffold/cache $SKAFFOLD_CACHE_GCS + gcloud storage cp ~/.skaffold/cache $SKAFFOLD_CACHE_GCS e2e-api-test: runs-on: ubuntu-latest