From c24058ef18ff78606d26ce4502587e4a98bb1bac Mon Sep 17 00:00:00 2001 From: gurusai-voleti Date: Thu, 19 Feb 2026 11:27:13 +0000 Subject: [PATCH 1/2] chore: Migrate gsutil usage to gcloud storage --- script/all-utilities | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/script/all-utilities b/script/all-utilities index c99f4c58..e3a830c0 100644 --- a/script/all-utilities +++ b/script/all-utilities @@ -149,7 +149,7 @@ function retry() { # Download api Keys from Cloud storage and source the file. function set_api_keys() { local api_key_directory="$(mktemp -d)" - $GSUTIL cp gs://esp-testing-secret-files/api_keys \ + $GCLOUD storage cp gs://esp-testing-secret-files/api_keys \ "${api_key_directory}/api_keys" \ || error_exit "Failed to download API key file." @@ -159,8 +159,7 @@ function set_api_keys() { # Download test-client keys from Cloud storage function get_test_client_key() { local key_path=$1 - [[ -e $key_path ]] || $GSUTIL \ - cp gs://esp-testing-secret-files/esp-test-client-b1289e36f3df.json $key_path + [[ -e $key_path ]] || $GCLOUD storage cp gs://esp-testing-secret-files/esp-test-client-b1289e36f3df.json $key_path echo -n $key_path return 0 } @@ -294,7 +293,7 @@ function activate_service_account() { ;; esac echo "Downloading ${project} service account" - retry -n 5 -s 10 gsutil cp \ + retry -n 5 -s 10 gcloud storage cp \ "gs://esp-testing-secret-files/${remote_json_name}" "${local_json}" \ || error_exit "Could not download secret keys for ${project}" echo "Gcloud auth activate ${project} service account." @@ -319,7 +318,7 @@ function update_tool() { [[ -z "${TOOLS_BUCKET}" ]] && return 1 echo "Uploading ${local_path} to ${remote_path}." - ${GSUTIL} cp "${local_path}" "${remote_path}" \ + ${GCLOUD} storage cp "${local_path}" "${remote_path}" \ || { echo "Failed to upload ${tool_name} to ${TOOLS_BUCKET}"; return 1; } return 0 } @@ -332,7 +331,7 @@ function get_tool() { [[ -z "${TOOLS_BUCKET}" ]] && return 1 echo "Downloading ${remote_path} to ${local_path}." - ${GSUTIL} cp "${remote_path}" "${local_path}" \ + ${GCLOUD} storage cp "${remote_path}" "${local_path}" \ || { echo "Failed to upload ${tool_name} to ${TOOLS_BUCKET}"; return 1; } return 0 } From 454d5be2359c557864f15606e87f6f74e033b413 Mon Sep 17 00:00:00 2001 From: gurusai-voleti Date: Thu, 19 Feb 2026 12:13:39 +0000 Subject: [PATCH 2/2] chore: update --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ed8bb9dc..f39a6342 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -824,7 +824,7 @@ def checkoutSourceCode() { } def pathExistsCloudStorage(filePath) { - def status = sh(returnStatus: true, script: "gsutil stat ${filePath}") + def status = sh(returnStatus: true, script: "gcloud storage objects list --stat ${filePath}") return status == 0 } @@ -839,8 +839,8 @@ def fastStash(name, stashPaths) { if (!pathExistsCloudStorage(archivePath)) { echo("Stashing ${stashPaths} to ${archivePath}") retry(5) { - sh("tar czf - ${stashPaths} | gsutil " + - "-h Content-Type:application/x-gtar cp - ${archivePath}") + sh("tar czf - ${stashPaths} | gcloud storage cp " + + " - ${archivePath} --content-type="application/x-gtar") sleep(5) } } @@ -849,7 +849,7 @@ def fastStash(name, stashPaths) { def fastUnstash(name) { def archivePath = stashArchivePath(name) retry(5) { - sh("gsutil cp ${archivePath} - | tar zxf - ") + sh("gcloud storage cp ${archivePath} - | tar zxf - ") sleep(5) } }