mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
cks: fix CNI release url returning 404 (#4684)
CNI plugin release naming has changed, https://github.com/containernetworking/plugins/releases Release are named for host OS from 0.8.0 onwards. This change adds check for 404 response code and attempts retry Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
6f361c3760
commit
e13363ed76
@ -37,7 +37,10 @@ CNI_VERSION="v${3}"
|
||||
echo "Downloading CNI ${CNI_VERSION}..."
|
||||
cni_dir="${working_dir}/cni/"
|
||||
mkdir -p "${cni_dir}"
|
||||
curl -L "https://github.com/containernetworking/plugins/releases/download/${CNI_VERSION}/cni-plugins-amd64-${CNI_VERSION}.tgz" -o "${cni_dir}/cni-plugins-amd64.tgz"
|
||||
cni_status_code=$(curl -L --write-out "%{http_code}\n" "https://github.com/containernetworking/plugins/releases/download/${CNI_VERSION}/cni-plugins-linux-amd64-${CNI_VERSION}.tgz" -o "${cni_dir}/cni-plugins-amd64.tgz")
|
||||
if [[ ${cni_status_code} -eq 404 ]] ; then
|
||||
curl -L --write-out "%{http_code}\n" "https://github.com/containernetworking/plugins/releases/download/${CNI_VERSION}/cni-plugins-amd64-${CNI_VERSION}.tgz" -o "${cni_dir}/cni-plugins-amd64.tgz"
|
||||
fi
|
||||
|
||||
CRICTL_VERSION="v${4}"
|
||||
echo "Downloading CRI tools ${CRICTL_VERSION}..."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user