Skip to content

Commit

Permalink
[gke-automated-test-tool] fix bug in csi driver build (#2819)
Browse files Browse the repository at this point in the history
This fixes a bug unintentionally introduced in previous commit . In that commit, the bash function uuid was printing out some more information other than the uuid value itself because of the installation step. In bash, the printed log becomes the output of a function, hence the installation inside this function was changing the output of the uuid function breaking the caller. So, I have moved the installation out to wherever we're invoking this function.
  • Loading branch information
gargnitingoogle authored Dec 19, 2024
1 parent 4480221 commit 2739e51
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions perfmetrics/scripts/testing_on_gke/examples/run-gke-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -514,13 +514,6 @@ function ensureGcsFuseCsiDriverCode() {
}
uuid() {
if ! which uuidgen; then
# try to install uuidgen
sudo apt-get update && sudo apt-get install -y uuid-runtime
# confirm that it got installed.
which uuidgen
fi
echo $(uuidgen) | sed -e "s/\-//g" ;
}
Expand Down Expand Up @@ -565,6 +558,12 @@ function createCustomCsiDriverIfNeeded() {
make generate-spec-yaml
printf "\nBuilding a new custom CSI driver using the above GCSFuse binary ...\n\n"
registry=gcr.io/${project_id}/${USER}/${cluster_name}
if ! which uuidgen; then
# try to install uuidgen
sudo apt-get update && sudo apt-get install -y uuid-runtime
# confirm that it got installed.
which uuidgen
fi
stagingversion=$(uuid)
make build-image-and-push-multi-arch REGISTRY=${registry} GCSFUSE_PATH=gs://${package_bucket} STAGINGVERSION=${stagingversion}
printf "\nInstalling the new custom CSI driver built above ...\n\n"
Expand Down

0 comments on commit 2739e51

Please sign in to comment.