Skip to content

Commit 5587d6d

Browse files
chore:Migrate gsutil usage to gcloud storage (#397)
1 parent aeca730 commit 5587d6d

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎getting-started/update/README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,16 +178,15 @@ If you have no buckets in your project, use the [GCS guide] to select a name and
178178
then create the bucket:
179179

180180
```sh
181-
gsutil mb gs://$BUCKET_NAME
181+
gcloud storage buckets create gs://$BUCKET_NAME
182182
```
183183

184184
The `gsutil` tool provides a single command to configure buckets to send
185185
notifications to Cloud Pub/Sub:
186186

187187
```sh
188-
gsutil notifications create \
189-
-t projects/$GOOGLE_CLOUD_PROJECT/topics/gcs-updates -f json \
190-
gs://$BUCKET_NAME/
188+
gcloud storage buckets notifications create gs://$BUCKET_NAME/ \
189+
--topic=projects/$GOOGLE_CLOUD_PROJECT/topics/gcs-updates --payload-format=json
191190
# Output: Created Cloud Pub/Sub topic projects/.../topics/gcs-updates
192191
# Created notification config projects/_/buckets/$BUCKET_NAME/notificationConfigs/...
193192
```
@@ -274,7 +273,7 @@ gcloud beta eventarc triggers create gcs-updates-trigger \
274273
### Use `gsutil` to create a new GCS Object
275274

276275
```sh
277-
echo "The quick brown fox jumps over the lazy dog" | gsutil -q cp - gs://$BUCKET_NAME/fox.txt
276+
echo "The quick brown fox jumps over the lazy dog" | gcloud storage cp - gs://$BUCKET_NAME/fox.txt
278277
# Output: none
279278
```
280279

@@ -344,6 +343,7 @@ gcloud container images delete gcr.io/$GOOGLE_CLOUD_PROJECT/getting-started-cpp/
344343
### Remove all the notification in the Bucket
345344

346345
```sh
346+
# gsutil command 'notifications delete' with a bucket URL cannot be translated automatically. gcloud storage requires a specific notification ID or the --all flag.
347347
gsutil notifications delete gs://$BUCKET_NAME
348348
# Output: none
349349
```

‎populate-bucket/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ kubectl --namespace ${NAMESPACE} autoscale deployment worker --max 200 --min 1
178178

179179
```bash
180180
BUCKET_NAME=${GOOGLE_CLOUD_PROJECT}-bucket-1000000
181-
gsutil mb -p ${GOOGLE_CLOUD_PROJECT} gs://${BUCKET_NAME}
181+
gcloud storage buckets create gs://${BUCKET_NAME} --project=${GOOGLE_CLOUD_PROJECT}
182182
```
183183

184184
### Run the program locally to schedule the work

0 commit comments

Comments
 (0)