[ubuntu] Install yq (#3646)

This commit is contained in:
Yann Jouanique
2021-07-15 11:21:48 +02:00
committed by GitHub
parent ad358c8eb8
commit 5161c257a2
7 changed files with 31 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
#!/bin/bash -e
# Source the helpers for use with the script
source $HELPER_SCRIPTS/install.sh
YQ_BINARY=yq_linux_amd64
# As per https://github.com/mikefarah/yq#wget
YQ_URL=$(curl -s https://api.github.com/repos/mikefarah/yq/releases/latest | jq -r ".assets[].browser_download_url | select(endswith(\"$YQ_BINARY.tar.gz\"))")
echo "Downloading latest yq from $YQ_URL"
download_with_retries "$YQ_URL" "/tmp" "${YQ_BINARY}.tar.gz"
tar xzf "/tmp/${YQ_BINARY}.tar.gz" -C "/tmp"
mv /tmp/${YQ_BINARY} /usr/local/bin/yq
invoke_tests "Tools" "yq"