Skip to content

Commit 17fa85a

Browse files
committed
Migrating the path Migrating the gsutil usage to gcloud storage
1 parent 80dad8e commit 17fa85a

File tree

8 files changed

+20
-19
lines changed

8 files changed

+20
-19
lines changed

config/samples/resources/cloudbuildtrigger/build-trigger-for-cloud-source-repo/cloudbuild_v1beta1_cloudbuildtrigger.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ spec:
3939
timeout: 1800s
4040
step:
4141
- id: "download_zip"
42-
name: gcr.io/cloud-builders/gsutil
43-
args: ["cp", "gs://mybucket/remotefile.zip", "localfile.zip"]
42+
name: gcr.io/cloud-builders/gcloud
43+
args: ["storage", "cp", "gs://mybucket/remotefile.zip", "localfile.zip"]
4444
timeout: 300s
4545
- id: "build_package"
4646
name: gcr.io/cloud-builders/go

config/samples/resources/cloudbuildtrigger/build-trigger-for-github-repo/cloudbuild_v1beta1_cloudbuildtrigger.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ spec:
4242
timeout: 1800s
4343
step:
4444
- id: "download_zip"
45-
name: gcr.io/cloud-builders/gsutil
46-
args: ["cp", "gs://mybucket/remotefile.zip", "localfile.zip"]
45+
name: gcr.io/cloud-builders/gcloud
46+
args: ["storage", "cp", "gs://mybucket/remotefile.zip", "localfile.zip"]
4747
timeout: 300s
4848
- id: "build_package"
4949
name: gcr.io/cloud-builders/go

dev/tasks/deploy-release-manifest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ echo "Generated ${BUILD_DIR}/release-bundle.tar.gz for manual installation."
8484

8585
# Leave this step out of the script for now.
8686

87-
# gsutil cp ${REPO_ROOT}/.build/release-bundle.tar.gz gs://configconnector-operator/${LATEST_VERSION}/
88-
# gsutil cp ${REPO_ROOT}/.build/release-bundle.tar.gz gs://configconnector-operator/latest
87+
# gcloud storage cp ${REPO_ROOT}/.build/release-bundle.tar.gz gs://configconnector-operator/${LATEST_VERSION}/
88+
# gcloud storage cp ${REPO_ROOT}/.build/release-bundle.tar.gz gs://configconnector-operator/latest
8989

9090
# echo "Pushed the latest release-bundle."

dev/tasks/download-e2e-logs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,24 @@ cd ${REPO_ROOT}
3131
if [[ -z "${TEST:-}" ]]; then
3232
echo "Must specify TEST (e.g. TEST=e2e-service-pubsub)"
3333
echo "Listing tests:"
34-
gsutil ls gs://cnrm-prow/logs/ | sed -e "s@gs://cnrm-prow/logs/@@g" | sed -e "s@/@@g"
34+
gcloud storage ls gs://cnrm-prow/logs/ | sed -e "s@gs://cnrm-prow/logs/@@g" | sed -e "s@/@@g"
3535
exit 1
3636
fi
3737

3838
if [[ -z "${TEST_RUN:-}" ]]; then
3939
echo "TEST_RUN not specified, getting latest test run for ${TEST}"
40-
echo "To list recent runs: gsutil ls gs://cnrm-prow/logs/${TEST}/ | cut -f 6 -d / | sort | grep -v latest | tail"
41-
TEST_RUN=$(gsutil cat gs://cnrm-prow/logs/${TEST}/latest-build.txt)
40+
echo "To list recent runs: gcloud storage ls gs://cnrm-prow/logs/${TEST}/ | cut -f 6 -d / | sort | grep -v latest | tail"
41+
TEST_RUN=$(gcloud storage cat gs://cnrm-prow/logs/${TEST}/latest-build.txt)
4242
fi
4343

4444
echo "Getting test results:"
45-
gsutil cat gs://cnrm-prow/logs/${TEST}/${TEST_RUN}/finished.json | jq .
45+
gcloud storage cat gs://cnrm-prow/logs/${TEST}/${TEST_RUN}/finished.json | jq .
4646

4747
echo "Downloading golden output"
48-
gsutil cp gs://cnrm-prow/logs/${TEST}/${TEST_RUN}/artifacts/golden.zip .build/golden.zip
48+
gcloud storage cp gs://cnrm-prow/logs/${TEST}/${TEST_RUN}/artifacts/golden.zip .build/golden.zip
4949

5050
echo "Expanding golden output into testdata directory"
5151
unzip -o .build/golden.zip "pkg/test/resourcefixture/testdata/*"
5252

5353
echo "Downloading test log to e2e.log"
54-
gsutil cp gs://cnrm-prow/logs/${TEST}/${TEST_RUN}/build-log.txt e2e.log
54+
gcloud storage cp gs://cnrm-prow/logs/${TEST}/${TEST_RUN}/build-log.txt e2e.log

operator/scripts/utils/cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func DownloadAndExtractTarballAt(gcsPath, outputDir string) error {
3939
}
4040

4141
func DownloadObjectFromGCS(gcsPath, outputDir string) error {
42-
cmd := exec.Command("gsutil", "cp", gcsPath, outputDir)
42+
cmd := exec.Command("gcloud", "storage", "cp", gcsPath, outputDir)
4343
return Execute(cmd)
4444
}
4545

pkg/test/resourcefixture/testdata/basic/cloudbuild/v1beta1/cloudbuildtrigger/cloudbuildtrigger/create.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ spec:
3737
timeout: 1800s
3838
step:
3939
- id: "download_zip"
40-
name: gcr.io/cloud-builders/gsutil
41-
args: ["cp", "gs://mybucket/remotefile.zip", "localfile.zip"]
40+
name: gcr.io/cloud-builders/gcloud
41+
args: ["storage", "cp", "gs://mybucket/remotefile.zip", "localfile.zip"]
4242
timeout: 300s
4343
- id: "build_package"
4444
name: gcr.io/cloud-builders/go

pkg/test/resourcefixture/testdata/basic/cloudbuild/v1beta1/cloudbuildtrigger/cloudbuildtrigger/update.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ spec:
3737
timeout: 1800s
3838
step:
3939
- id: "download_zip"
40-
name: gcr.io/cloud-builders/gsutil
41-
args: ["cp", "gs://mybucket/remotefile.zip", "localfile.zip"]
40+
name: gcr.io/cloud-builders/gcloud
41+
entrypoint: gcloud
42+
args: ["storage", "cp", "gs://mybucket/remotefile.zip", "localfile.zip"]
4243
timeout: 300s
4344
- id: "build_package"
4445
name: gcr.io/cloud-builders/go

third_party/github.com/hashicorp/terraform-provider-google-beta/google-beta/services/storage/data_source_storage_object_signed_url_internal_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ const fakeCredentials = `{
2626
}
2727
`
2828

29-
// The following values are derived from the output of the `gsutil signurl` command.
29+
// The following values are derived from the output of the `gcloud storage sign-url` command.
3030
// i.e.
31-
// gsutil signurl fake_creds.json gs://tf-test-bucket-6159205297736845881/path/to/file
31+
// gcloud storage sign-url --private-key-file fake_creds.json gs://tf-test-bucket-6159205297736845881/path/to/file
3232
// URL HTTP Method Expiration Signed URL
3333
// gs://tf-test-bucket-6159205297736845881/path/to/file GET 2016-08-12 14:03:30 https://storage.googleapis.com/tf-test-bucket-6159205297736845881/path/to/file?GoogleAccessId=user@gcp-project.iam.gserviceaccount.com&Expires=1470967410&Signature=JJvE2Jc%2BeoagyS1qRACKBGUkgLkKjw7cGymHhtB4IzzN3nbXDqr0acRWGy0%2BEpZ3HYNDalEYsK0lR9Q0WCgty5I0JKmPIuo9hOYa1xTNH%2B22xiWsekxGV%2FcA9FXgWpi%2BFt7fBmMk4dhDe%2BuuYc7N79hd0FYuSBNW1Wp32Bluoe4SNkNAB%2BuIDd9KqPzqs09UAbBoz2y4WxXOQnRyR8GAfb8B%2FDtv62gYjtmp%2F6%2Fyr6xj7byWKZdQt8kEftQLTQmP%2F17Efjp6p%2BXo71Q0F9IhAFiqWfp3Ij8hHDSebLcVb2ULXyHNNQpHBOhFgALrFW3I6Uc3WciLEOsBS9Ej3EGdTg%3D%3D
3434

0 commit comments

Comments
 (0)