Skip to content

Commit

Permalink
upgrade gcloud version before rename benchmark run (#2511)
Browse files Browse the repository at this point in the history
  • Loading branch information
anushka567 authored Sep 18, 2024
1 parent 67bf9d1 commit b93c72b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ sudo bash add-google-cloud-ops-agent-repo.sh --also-install
UPLOAD_FLAGS=$1
gsutil cp gs://periodic-perf-tests/creds.json ../gsheet/

echo "Upgrading gcloud version"
../upgrade_gcloud.sh

#echo "Running renaming benchmark on flat bucket"
#python3 renaming_benchmark.py config-flat.json flat "$UPLOAD_FLAGS"
Expand Down
27 changes: 27 additions & 0 deletions perfmetrics/scripts/upgrade_gcloud.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

sudo apt-get update
# Upgrade gcloud version.
# Kokoro machine's outdated gcloud version prevents the use of the "gcloud storage" feature.
gcloud version
wget -O gcloud.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz -q
sudo tar xzf gcloud.tar.gz && sudo cp -r google-cloud-sdk /usr/local && sudo rm -r google-cloud-sdk
sudo /usr/local/google-cloud-sdk/install.sh
export PATH=/usr/local/google-cloud-sdk/bin:$PATH
echo 'export PATH=/usr/local/google-cloud-sdk/bin:$PATH' >> ~/.bashrc
gcloud version && rm gcloud.tar.gz
sudo /usr/local/google-cloud-sdk/bin/gcloud components update
sudo /usr/local/google-cloud-sdk/bin/gcloud components install alpha

0 comments on commit b93c72b

Please sign in to comment.