From 726f52d3d3e04fe662f731e8f853908ef5c792d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20MERLE?= <95630726+smerle33@users.noreply.github.com> Date: Tue, 19 Dec 2023 09:37:53 +0100 Subject: [PATCH] feat(xq) adding xq as new tool (#958) --- goss/goss-linux.yaml | 5 +++++ provisioning/tools-versions.yml | 1 + provisioning/ubuntu-provision.sh | 8 ++++++++ 3 files changed, 14 insertions(+) diff --git a/goss/goss-linux.yaml b/goss/goss-linux.yaml index 65cf665bd..0750d341d 100644 --- a/goss/goss-linux.yaml +++ b/goss/goss-linux.yaml @@ -186,6 +186,11 @@ command: vagrant: exec: vagrant -v exit-status: 0 + xq: + exec: xq --version + exit-status: 0 + stdout: + - 1.2.3 yq: exec: yq --version exit-status: 0 diff --git a/provisioning/tools-versions.yml b/provisioning/tools-versions.yml index 3f0494ecc..110fec7bb 100644 --- a/provisioning/tools-versions.yml +++ b/provisioning/tools-versions.yml @@ -36,5 +36,6 @@ trivy_version: 0.47.0 updatecli_version: 0.69.0 vagrant_version: 2.4.0 windows_pwsh_version: 7.4.0 +xq_version: 1.2.3 yq_version: 4.25.3 playwright_version: 1.40.1 diff --git a/provisioning/ubuntu-provision.sh b/provisioning/ubuntu-provision.sh index 7ee38b796..4b954b658 100755 --- a/provisioning/ubuntu-provision.sh +++ b/provisioning/ubuntu-provision.sh @@ -460,6 +460,13 @@ function install_ruby() { install_asdf_package ruby "${RUBY_VERSION}" } +## Install Xq +function install_xq() { + install_dir=/usr/local/bin + curl --fail --silent --location --show-error \ + "https://github.com/sibprogrammer/xq/releases/download/v${XQ_VERSION}/xq_${XQ_VERSION}_linux_${ARCHITECTURE}.tar.gz" | tar --extract --gunzip --directory="${install_dir}"/ xq +} + ## Install Yq with asdf function install_yq() { # Ensure that ASDF is installed @@ -652,6 +659,7 @@ function main() { install_gh install_vagrant install_ruby + install_xq install_yq install_packer install_updatecli