argo-cd/hack/installers/install-kubectl-linux.sh
jannfis 66f36ff002
chore: Validate checksums of downloaded files in build chain (#6057)
* chore: Validate checksums of downloaded files in build chain

Signed-off-by: jannfis <jann@mistrust.net>

* Fix arm install of kustomize

Signed-off-by: jannfis <jann@mistrust.net>

* Add sudo package to Go builder image

Signed-off-by: jannfis <jann@mistrust.net>
2021-04-19 18:46:21 +02:00

11 lines
531 B
Bash
Executable file

#!/bin/bash
set -eux -o pipefail
. $(dirname $0)/../tool-versions.sh
export TARGET_FILE=kubectl_${ARCHITECTURE}_${kubectl_version}
# NOTE: keep the version synced with https://storage.googleapis.com/kubernetes-release/release/stable.txt
[ -e $DOWNLOADS/${TARGET_FILE} ] || curl -sLf --retry 3 -o ${DOWNLOADS}/${TARGET_FILE} https://storage.googleapis.com/kubernetes-release/release/v${kubectl_version}/bin/linux/$ARCHITECTURE/kubectl
$(dirname $0)/compare-chksum.sh
sudo install -m 0755 ${DOWNLOADS}/${TARGET_FILE} $BIN/kubectl