Skip to content

Commit cfd8465

Browse files
committed
refactor: replace legacy gsutil calls with gcloud
1 parent 5e7e0f9 commit cfd8465

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

memorystore/redis/gce_deployment/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ GOOS=linux GOARCH=amd64 go build -v -o app ../main.go
2727
# Add the app binary
2828
tar -cvf app.tar app
2929
# Copy to GCS bucket
30-
gsutil cp app.tar gs://"$GCS_BUCKET_NAME"/gce/
30+
gcloud storage cp app.tar gs://"$GCS_BUCKET_NAME"/gce/
3131

3232
# Create an instance
3333
gcloud compute instances create my-instance \

memorystore/redis/gce_deployment/startup-script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fi
2424
chmod +x google-fluentd-install.sh && ./google-fluentd-install.sh
2525
service google-fluentd restart &
2626

27-
gsutil cp gs://"$GCS_BUCKET_NAME"/gce/app.tar /app.tar
27+
gcloud storage cp gs://"$GCS_BUCKET_NAME"/gce/app.tar /app.tar
2828
mkdir -p /app
2929
tar -x -f /app.tar -C /app
3030
chmod +x /app/app

testing/cloudbuild/cloudbuild.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ steps:
2323
- REPORT_REPO=golang-samples
2424

2525
# Get the credentials for integration tests.
26-
- name: gcr.io/cloud-builders/gsutil
27-
args: ['cp', 'gs://golang-samples-secrets/golang-samples-tests-4fbf85dd0f24.json', 'key.json']
26+
- name: gcr.io/google.com/cloudsdktool/google-cloud-cli
27+
entrypoint: gcloud
28+
args: ['storage', 'cp', 'gs://golang-samples-secrets/golang-samples-tests-4fbf85dd0f24.json', 'key.json']
2829

2930
# Run the tests
3031
- name: gcr.io/$PROJECT_ID/go19

testing/gimmeproj/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ cross:
1414
GOOS=windows GOARCH=amd64 go build ${LDFLAGS} -o bin/windows_amd64/gimmeproj.exe
1515

1616
upload: cross
17-
gsutil -m cp -a public-read -r bin/* gs://gimme-proj/
17+
gcloud storage cp -r bin/* gs://gimme-proj/ --predefined-acl=publicRead

0 commit comments

Comments
 (0)