Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/install-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ function cleanup() {
trap cleanup EXIT

echo "Downloading helm ${HELM_VERSION}"
gsutil cp "${HELM_TARBALL_URL}" "${HELM_TARBALL}"
gsutil cp "${HELM_CHECKSUM_URL}" "${HELM_CHECKSUM}"
gcloud storage cp "${HELM_TARBALL_URL}" "${HELM_TARBALL}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you checked all occurrence of gsutil? I believe there are other locations using it.

gcloud storage cp "${HELM_CHECKSUM_URL}" "${HELM_CHECKSUM}"
Comment on lines +58 to +59
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The two gcloud storage cp commands can be combined into a single invocation. This is more efficient as it avoids the overhead of starting the gcloud Python interpreter twice, which can be significant (often 1-2 seconds per invocation) in build and CI/CD environments. Since the local destination filenames match the remote filenames, you can provide multiple sources and specify the destination directory.

Suggested change
gcloud storage cp "${HELM_TARBALL_URL}" "${HELM_TARBALL}"
gcloud storage cp "${HELM_CHECKSUM_URL}" "${HELM_CHECKSUM}"
gcloud storage cp "${HELM_TARBALL_URL}" "${HELM_CHECKSUM_URL}" "${TMPDIR}/"


echo "Verifying helm checksum"
echo "$(cat "${HELM_CHECKSUM}") ${HELM_TARBALL}" | sha256sum -c
Expand Down