From fe308159785122a5eedefbebea885f46c8a2e679 Mon Sep 17 00:00:00 2001 From: Suraj Deshmukh Date: Fri, 18 Aug 2023 16:24:22 +0000 Subject: [PATCH] guest-component depds: Install clang and devmapper libs Fixes: #5750 Signed-off-by: Suraj Deshmukh --- .ci/install-guest-component-dependencies.sh | 36 +++++++++++++++++++++ .ci/jenkins_job_build.sh | 5 ++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100755 .ci/install-guest-component-dependencies.sh diff --git a/.ci/install-guest-component-dependencies.sh b/.ci/install-guest-component-dependencies.sh new file mode 100755 index 000000000..82dfbb32a --- /dev/null +++ b/.ci/install-guest-component-dependencies.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# +# Copyright (c) 2018 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# + +set -o errexit +set -o nounset +set -o pipefail + +# Detect if the OS is Ubuntu or fedora +source "/etc/os-release" || source "/usr/lib/os-release" + +# On Ubuntu or debian, install the dependencies +if [ "$ID" == "ubuntu" ] || [ "$ID" == "debian" ]; then + export DEBIAN_FRONTEND=noninteractive + sudo apt update + sudo apt install -y \ + libdevmapper-dev \ + clang + + exit 0 +fi + +# On Fedora, install the dependencies +if [ "$ID" == "fedora" ]; then + sudo dnf install -y \ + device-mapper-devel \ + clang + + exit 0 +fi + +echo "Unsupported OS: $ID" +exit 1 diff --git a/.ci/jenkins_job_build.sh b/.ci/jenkins_job_build.sh index ed8e825e2..bcd3ba331 100755 --- a/.ci/jenkins_job_build.sh +++ b/.ci/jenkins_job_build.sh @@ -180,6 +180,9 @@ fi # - We got get changes if versions.yaml changed. "${GOPATH}/src/${tests_repo}/.ci/install_go.sh" -p -f +# Install the guest component dependencies. +"${GOPATH}/src/${tests_repo}/.ci/install-guest-component-dependencies.sh" + # Check if we can fastpath return/skip the CI # Work around the 'set -e' dying if the check fails by using a bash # '{ group command }' to encapsulate. @@ -307,4 +310,4 @@ case ${test_type} in *) echo "Unknown test type." >&2 && exit 1 ;; esac -popd \ No newline at end of file +popd