diff --git a/Dockerfile b/Dockerfile index 0f3caadb6..5f695c65c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,7 +56,7 @@ ARG HTTPS_PROXY ARG KUBECTL_VERSION="v1.31.1" #donwload & install kubectl -RUN curl -sSL -o /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl &&\ +RUN curl -fsSL -o /usr/local/bin/kubectl https://dl.k8s.io/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl &&\ chmod +x /usr/local/bin/kubectl # Copy scripts diff --git a/scripts/download_argo.py b/scripts/download_argo.py index 4d8429fb0..5335e44a1 100644 --- a/scripts/download_argo.py +++ b/scripts/download_argo.py @@ -8,7 +8,6 @@ import stat from subprocess import Popen, PIPE -from packaging import version from dataclasses import dataclass from typing import List, Dict, Any, Optional, IO, cast @@ -73,12 +72,12 @@ def make_file_executable(file_path: str): def download_gz_binary(url: str, output_file: str, timeout: int = None): with open(output_file, "wb") as f: - p1 = Popen(["curl", "-sL", url], stdout=PIPE) + p1 = Popen(["curl", "-fsL", url], stdout=PIPE) p2 = Popen(["gzip", "-d"], stdin=p1.stdout, stdout=f) cast(IO[bytes], p1.stdout).close() p2.communicate(timeout=timeout) if p2.returncode != 0: - raise RuntimeError("Failed to download %s" % url) + raise IOError("Failed to download %s" % url) def symlink(src: str, dst: str): @@ -136,6 +135,7 @@ def main(): "-t", "--process-timeout", default=PROCESS_TIMEOUT, + type=int, help="Subprocesses timeout in seconds. Default: %d" % PROCESS_TIMEOUT, ) args = parser.parse_args()