From 6abb959ed9b4cda14e43e3100579eadcce88ee60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Tue, 21 Jan 2025 13:42:58 +0100 Subject: [PATCH] Add schutzbot/manifest-tests-install-deps.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a script to setup the environment for manifest tests to run. This includes enabling specific repositories on RHEL, installing required packages and installing AWSCLI for accessing S3. Signed-off-by: Tomáš Hozza --- schutzbot/manifest-tests-install-deps.sh | 78 ++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100755 schutzbot/manifest-tests-install-deps.sh diff --git a/schutzbot/manifest-tests-install-deps.sh b/schutzbot/manifest-tests-install-deps.sh new file mode 100755 index 00000000..14a48177 --- /dev/null +++ b/schutzbot/manifest-tests-install-deps.sh @@ -0,0 +1,78 @@ +#!/bin/bash +set -euxo pipefail + +# Get OS details. +source /etc/os-release +ARCH=$(uname -m) + +# btrfs is not available on RHEL and CentOS. +if [[ "${ID}" == "fedora" ]]; then + sudo dnf install -y btrfs-progs-devel +fi + +sudo dnf -y install \ + gcc \ + git-core \ + go \ + gpgme-devel \ + osbuild-depsolve-dnf \ + osbuild-tools \ + device-mapper-devel \ + unzip + +# Install awscli +WORKDIR=$(mktemp -d) +pushd "${WORKDIR}" + +# Import the AWS CLI public key. +AWSCLI_PUB_KEY="awscliv2.pubkey" +cat < /dev/null + +# Verify the installation. +aws --version +popd +rm -rf "${WORKDIR}" \ No newline at end of file