Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions run/image-processing/test/e2e_test_cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ steps:
"gcloud pubsub subscriptions delete ${_SERVICE}_sub"

- id: 'Delete GCS buckets'
name: 'gcr.io/cloud-builders/gsutil:latest'
name: 'gcr.io/cloud-builders/gcloud:latest'
entrypoint: /bin/bash
args:
- '-c'
- |
./test/retry.sh "gsutil rm -r gs://${_SERVICE}_input"
./test/retry.sh "gsutil rm -r gs://${_SERVICE}_output"
./test/retry.sh "gcloud storage rm --recursive gs://${_SERVICE}_input"
./test/retry.sh "gcloud storage rm --recursive gs://${_SERVICE}_output"

substitutions:
_SERVICE: image-processing
Expand Down
10 changes: 5 additions & 5 deletions run/image-processing/test/e2e_test_setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,24 @@ steps:
--update-env-vars=BLURRED_BUCKET_NAME=${_SERVICE}_output"

- id: 'Create GCS buckets with Pub/Sub notification'
name: 'gcr.io/cloud-builders/gsutil:latest'
name: 'gcr.io/cloud-builders/gcloud:latest'
entrypoint: /bin/bash
args:
- '-c'
- |
# Create Buckets
./test/retry.sh "gsutil mb -p ${PROJECT_ID} gs://${_SERVICE}_input"
./test/retry.sh "gsutil mb -p ${PROJECT_ID} gs://${_SERVICE}_output"
./test/retry.sh "gcloud storage buckets create --project=${PROJECT_ID} gs://${_SERVICE}_input"
./test/retry.sh "gcloud storage buckets create --project=${PROJECT_ID} gs://${_SERVICE}_output"

# Create Pub/Sub notification
./test/retry.sh "gsutil notification create -t ${_SERVICE} -f json gs://${_SERVICE}_input"
./test/retry.sh "gcloud storage buckets notifications create --topic=${_SERVICE} --payload-format=json gs://${_SERVICE}_input"
./test/retry.sh "gcloud pubsub subscriptions create ${_SERVICE}_sub \
--topic ${_SERVICE} \
--push-endpoint $(gcloud run services describe ${_SERVICE} --project=${PROJECT_ID} --platform=${_PLATFORM} --region=${_REGION} --format='value(status.url)') \
--push-auth-service-account cloud-run-invoker@${PROJECT_ID}.iam.gserviceaccount.com"
sleep 5
# Upload photo
./test/retry.sh "gsutil cp test/zombie.jpg gs://${_SERVICE}_input"
./test/retry.sh "gcloud storage cp test/zombie.jpg gs://${_SERVICE}_input"
sleep 30


Expand Down
Loading