Skip to content

Commit 242927a

Browse files
chore: Migrate gsutil usage to gcloud storage (#3469)
Co-authored-by: Baha Aiman <bahaaiman@google.com>
1 parent 0f1cb7b commit 242927a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

integration-tests/downscope/setup.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@ if (( $# != 1 ))
5656
then
5757
# Create the GCS bucket.
5858
bucket_id="cab-int-bucket-"${suffix}
59-
gsutil mb -b on -l us-east1 gs://${bucket_id}
59+
gcloud storage buckets create gs://${bucket_id} --uniform-bucket-level-access --location=us-east1
6060
else
6161
bucket_id="$1"
6262
fi
6363

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

6767
# Create both objects.
6868
echo "first" >> ${first_object}
6969
echo "second" >> ${second_object}
7070

7171
# Upload the created objects to the bucket.
72-
gsutil cp ${first_object} gs://${bucket_id}
73-
gsutil cp ${second_object} gs://${bucket_id}
72+
gcloud storage cp ${first_object} gs://${bucket_id}
73+
gcloud storage cp ${second_object} gs://${bucket_id}
7474

7575
echo "Bucket ID: "${bucket_id}
7676
echo "First object ID: "${first_object}

0 commit comments

Comments
 (0)