Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts: ignore download_hash download failures #10998

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion scripts/download_hash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ function _get_checksum() {
# Download URLs
declare -A urls=(
["crictl"]="$(printf "$github_releases_url" "kubernetes-sigs/cri-tools" "crictl-$version-$os-$arch.tar.gz.sha256")"
["crio_archive"]="$google_url/cri-o/artifacts/cri-o.$arch.$version.tar.gz"
["crio_archive"]="$google_url/cri-o/artifacts/cri-o.$arch.$version.tar.gz.sha256sum"
["kubelet"]="$(printf "$k8s_url" "kubelet")"
["kubectl"]="$(printf "$k8s_url" "kubectl")"
["kubeadm"]="$(printf "$k8s_url" "kubeadm")"
Expand All @@ -287,6 +287,11 @@ function _get_checksum() {

mkdir -p "$(dirname $target)"
[ -f "$target" ] || curl -LfSs -o "${target}" "${urls[$binary]}"
if [ ! -f "$target" ]; then
echo "$target can't be downloaded" >&2
echo 0
return
fi
if echo "${urls[$binary]}" | grep -qi sha256sum; then
local hashes="$(cat "${target}")"
if [ "$(echo "${hashes}" | wc -l)" -gt 1 ]; then
Expand Down