-
Notifications
You must be signed in to change notification settings - Fork 505
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use latest krel binary release instead of compilation in cloudbuild
This pins `krel` to the latest available release for all cloudbuild jobs, which usually run in production. It should also speedup the whole process because we do not have to download and compile all those golang dependencies. Signed-off-by: Sascha Grunert <[email protected]>
- Loading branch information
1 parent
9e6769c
commit 15bc44d
Showing
8 changed files
with
50 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
curl_retry() { | ||
curl -sSfL --retry 5 --retry-delay 3 "$@" | ||
} | ||
|
||
KREL_OUTPUT_PATH=${KREL_OUTPUT_PATH:-bin/krel} | ||
echo "Using output path: $KREL_OUTPUT_PATH" | ||
mkdir -p "$(dirname "$KREL_OUTPUT_PATH")" | ||
|
||
LATEST_RELEASE=$(curl_retry https://api.github.com/repos/kubernetes/release/releases/latest | jq -r .tag_name) | ||
echo "Using krel release: $LATEST_RELEASE" | ||
|
||
echo "Downloading krel from GCB bucket…" | ||
GCB_URL="https://storage.googleapis.com/k8s-artifacts-sig-release/kubernetes/release/$LATEST_RELEASE/krel-amd64-linux" | ||
curl_retry "$GCB_URL" -o "$KREL_OUTPUT_PATH" | ||
chmod +x "$KREL_OUTPUT_PATH" | ||
|
||
echo "Done, output of 'krel version':" | ||
"$KREL_OUTPUT_PATH" version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters