Skip to content

Commit 6b2c4a5

Browse files
chore: Migrate gsutil usage to gcloud storage (#1883)
1 parent 61093d7 commit 6b2c4a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

google-auth-library-java/scripts/downscoping-with-cab-setup.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,18 @@ service_account_email=""
7474
gcloud config set project ${project_id}
7575

7676
# Create the GCS bucket.
77-
gsutil mb -b on -l us-east1 gs://${bucket_id}
77+
gcloud storage buckets create gs://${bucket_id} --uniform-bucket-level-access --location us-east1
7878

7979
# Give the specified service account the objectAdmin role for this bucket.
80-
gsutil iam ch serviceAccount:${service_account_email}:objectAdmin gs://${bucket_id}
80+
gcloud storage buckets add-iam-policy-binding gs://${bucket_id} --member=serviceAccount:${service_account_email} --role=roles/storage.objectAdmin
8181

8282
# Create both objects.
8383
echo "first" >> ${first_object}
8484
echo "second" >> ${second_object}
8585

8686
# Upload the created objects to the bucket.
87-
gsutil cp ${first_object} gs://${bucket_id}
88-
gsutil cp ${second_object} gs://${bucket_id}
87+
gcloud storage cp ${first_object} gs://${bucket_id}
88+
gcloud storage cp ${second_object} gs://${bucket_id}
8989

9090
echo "Bucket ID: "${bucket_id}
9191
echo "First object ID: "${first_object}

0 commit comments

Comments
 (0)