Skip to content

Commit cf47a9b

Browse files
author
Yuriy Bezsonov
committed
feat(ide): Improve Kubernetes tools installation reliability
1 parent 2f111d9 commit cf47a9b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

infra/scripts/ide/tools.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,13 @@ install_kubernetes_tools() {
242242

243243
log_info "Installing k9s..."
244244
export PATH="$HOME/.local/bin:$PATH" # k9s installs to ~/.local/bin
245-
install_with_version "k9s" "curl -sS https://webinstall.dev/k9s | bash" "k9s version --short 2>/dev/null | grep Version | awk '{print \$2}'" "LOG"
245+
install_with_version "k9s" "curl -sS https://webinstall.dev/k9s | bash" "k9s version --short 2>/dev/null | grep Version | awk '{print \$2}'" "LOG" || true
246246

247247
log_info "Installing e1s..."
248-
install_with_version "e1s" "curl -sL https://raw.githubusercontent.com/keidarcy/e1s-install/master/cloudshell-install.sh | bash" "e1s --version 2>/dev/null | grep 'Current:' | awk '{print \$2}'" "LOG"
248+
E1S_VERSION=$(curl -s https://api.github.com/repos/keidarcy/e1s/releases/latest | jq -r '.tag_name')
249+
curl -sSLf "https://github.com/keidarcy/e1s/releases/download/${E1S_VERSION}/e1s_${E1S_VERSION#v}_linux_${ARCH_K8S}.tar.gz" -o /tmp/e1s.tar.gz
250+
tar -xzf /tmp/e1s.tar.gz -C /tmp
251+
install_with_version "e1s" "cp /tmp/e1s $HOME/.local/bin/ && rm -f /tmp/e1s.tar.gz /tmp/e1s" "e1s --version 2>/dev/null | grep 'Current:' | awk '{print \$2}'" "LOG" || true
249252
}
250253

251254
install_kubernetes_tools

0 commit comments

Comments
 (0)