Skip to content

Commit 3b66abe

Browse files
chore: Migrate gsutil usage to gcloud storage (#4214)
Co-authored-by: Katie McLaughlin <katie@glasnt.com>
1 parent 6a5ac65 commit 3b66abe

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

run/image-processing/test/e2e_test_cleanup.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ steps:
2424
"gcloud pubsub subscriptions delete ${_SERVICE}_sub"
2525
2626
- id: 'Delete GCS buckets'
27-
name: 'gcr.io/cloud-builders/gsutil:latest'
27+
name: 'gcr.io/cloud-builders/gcloud:latest'
2828
entrypoint: /bin/bash
2929
args:
3030
- '-c'
3131
- |
32-
./test/retry.sh "gsutil rm -r gs://${_SERVICE}_input"
33-
./test/retry.sh "gsutil rm -r gs://${_SERVICE}_output"
32+
./test/retry.sh "gcloud storage rm --recursive gs://${_SERVICE}_input"
33+
./test/retry.sh "gcloud storage rm --recursive gs://${_SERVICE}_output"
3434
3535
substitutions:
3636
_SERVICE: image-processing

run/image-processing/test/e2e_test_setup.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,24 @@ steps:
3030
--update-env-vars=BLURRED_BUCKET_NAME=${_SERVICE}_output"
3131
3232
- id: 'Create GCS buckets with Pub/Sub notification'
33-
name: 'gcr.io/cloud-builders/gsutil:latest'
33+
name: 'gcr.io/cloud-builders/gcloud:latest'
3434
entrypoint: /bin/bash
3535
args:
3636
- '-c'
3737
- |
3838
# Create Buckets
39-
./test/retry.sh "gsutil mb -p ${PROJECT_ID} gs://${_SERVICE}_input"
40-
./test/retry.sh "gsutil mb -p ${PROJECT_ID} gs://${_SERVICE}_output"
39+
./test/retry.sh "gcloud storage buckets create --project=${PROJECT_ID} gs://${_SERVICE}_input"
40+
./test/retry.sh "gcloud storage buckets create --project=${PROJECT_ID} gs://${_SERVICE}_output"
4141
4242
# Create Pub/Sub notification
43-
./test/retry.sh "gsutil notification create -t ${_SERVICE} -f json gs://${_SERVICE}_input"
43+
./test/retry.sh "gcloud storage buckets notifications create --topic=${_SERVICE} --payload-format=json gs://${_SERVICE}_input"
4444
./test/retry.sh "gcloud pubsub subscriptions create ${_SERVICE}_sub \
4545
--topic ${_SERVICE} \
4646
--push-endpoint $(gcloud run services describe ${_SERVICE} --project=${PROJECT_ID} --platform=${_PLATFORM} --region=${_REGION} --format='value(status.url)') \
4747
--push-auth-service-account cloud-run-invoker@${PROJECT_ID}.iam.gserviceaccount.com"
4848
sleep 5
4949
# Upload photo
50-
./test/retry.sh "gsutil cp test/zombie.jpg gs://${_SERVICE}_input"
50+
./test/retry.sh "gcloud storage cp test/zombie.jpg gs://${_SERVICE}_input"
5151
sleep 30
5252
5353

0 commit comments

Comments
 (0)