From 295244d6aa32c639f6aa69d84c7a224499ac3d77 Mon Sep 17 00:00:00 2001 From: Peter Ebden Date: Tue, 6 Oct 2026 12:53:25 +0100 Subject: [PATCH] Convert gsutil calls to gcloud --- .circleci/perf_test.sh | 22 +++++++++++----------- .circleci/release.sh | 10 +++++----- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.circleci/perf_test.sh b/.circleci/perf_test.sh index e704f41c33..6fffa2bf39 100755 --- a/.circleci/perf_test.sh +++ b/.circleci/perf_test.sh @@ -24,14 +24,14 @@ echo "Uploading results..." echo $GCLOUD_SERVICE_KEY > $GOOGLE_APPLICATION_CREDENTIALS echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account --key-file=- -gsutil cp plz.prof "${BUCKET}/${CIRCLE_SHA1}.prof" -gsutil cp results.json "${BUCKET}/${CIRCLE_SHA1}.json" -if gsutil ls "${BUCKET}/all_results.jsonl"; then - gsutil cp "${BUCKET}/all_results.jsonl" all_results.jsonl +gcloud storage cp plz.prof "${BUCKET}/${CIRCLE_SHA1}.prof" +gcloud storage cp results.json "${BUCKET}/${CIRCLE_SHA1}.json" +if gcloud storage ls "${BUCKET}/all_results.jsonl"; then + gcloud storage cp "${BUCKET}/all_results.jsonl" all_results.jsonl cat all_results.jsonl results.json | tail -n 100 > updated_results.jsonl - gsutil cp updated_results.jsonl "${BUCKET}/all_results.jsonl" + gcloud storage cp updated_results.jsonl "${BUCKET}/all_results.jsonl" else - gsutil cp results.json "${BUCKET}/all_results.jsonl" + gcloud storage cp results.json "${BUCKET}/all_results.jsonl" fi rm -rf tree @@ -45,15 +45,15 @@ for RESULT in plz-out/benchmarks/*.json; do echo "Uploading ${BENCHMARK_NAME} results..." - gsutil cp "$RESULT" "${BUCKET}/${BENCHMARK_NAME}_${CIRCLE_SHA1}.json" + gcloud storage cp "$RESULT" "${BUCKET}/${BENCHMARK_NAME}_${CIRCLE_SHA1}.json" ALL_RESULTS="${BENCHMARK_NAME}_all_results.jsonl" - if gsutil ls "${BUCKET}/${ALL_RESULTS}"; then - gsutil cp "${BUCKET}/${ALL_RESULTS}" "${ALL_RESULTS}" + if gcloud storage ls "${BUCKET}/${ALL_RESULTS}"; then + gcloud storage cp "${BUCKET}/${ALL_RESULTS}" "${ALL_RESULTS}" cat "${ALL_RESULTS}" "${RESULT}" | tail -n 100 > "updated_${ALL_RESULTS}" - gsutil cp "updated_${ALL_RESULTS}" "${BUCKET}/${ALL_RESULTS}" + gcloud storage cp "updated_${ALL_RESULTS}" "${BUCKET}/${ALL_RESULTS}" else - gsutil cp "${RESULT}" "${BUCKET}/${ALL_RESULTS}" + gcloud storage cp "${RESULT}" "${BUCKET}/${ALL_RESULTS}" fi done diff --git a/.circleci/release.sh b/.circleci/release.sh index f51286bd49..4b3794896f 100755 --- a/.circleci/release.sh +++ b/.circleci/release.sh @@ -9,7 +9,7 @@ release_folder() { local folder=$1 local path=$2 - gsutil rsync -r $folder gs://get.please.build/$path + gcloud storage rsync --recursive $folder gs://get.please.build/$path } # Copies a file to the bucket, optionally setting the content type @@ -19,9 +19,9 @@ release_file() { local content_type=$3 if [ -z "$content_type" ]; then - gsutil cp $file gs://get.please.build/$path + gcloud storage cp $file gs://get.please.build/$path else - gsutil -h "Content-Type:$content_type" cp $file gs://get.please.build/$path + gcloud storage cp --content-type="$content_type" $file gs://get.please.build/$path fi } @@ -31,10 +31,10 @@ echo $GCLOUD_SERVICE_KEY | gcloud auth activate-service-account --key-file=- echo "Releasing docs website" tar -xzf /tmp/workspace/deep-docs.tar.gz -C /tmp/workspace && \ - gsutil rsync -r /tmp/workspace/docs gs://please.build + gcloud storage rsync --recursive /tmp/workspace/docs gs://please.build -if gsutil ls gs://get.please.build/linux_arm64/$VERSION/; then +if gcloud storage ls gs://get.please.build/linux_arm64/$VERSION/; then echo "Please $VERSION has already been released, nothing to do." exit 0 fi