Files
runner-images/images/ubuntu/scripts/build/install-yq.sh
Shamil Mubarakshin 1bd9214f41 [ubuntu] Rename build scripts (#8866)
* [ubuntu] Rename build scripts

* [ubuntu] Change reboot to inline shell

* [ubuntu] Move disk space validation to pester tests

* [ubuntu] Rename helper and tests files

* [ubuntu] Changes to cleanup, post-deployment and r scripts
2023-11-22 21:49:23 +01:00

21 lines
754 B
Bash

#!/bin/bash -e
################################################################################
## File: install-yq.sh
## Desc: Install YQ
## Supply chain security: YQ - checksum validation
################################################################################
# Source the helpers for use with the script
source $HELPER_SCRIPTS/install.sh
# Download YQ
base_url="https://github.com/mikefarah/yq/releases/latest/download"
download_with_retries "${base_url}/yq_linux_amd64" "/tmp" "yq"
# Supply chain security - YQ
external_hash=$(get_hash_from_remote_file "${base_url}/checksums" "yq_linux_amd64 " "" " " "19")
use_checksum_comparison "/tmp/yq" "${external_hash}"
# Install YQ
sudo install /tmp/yq /usr/bin/yq
invoke_tests "Tools" "yq"