Skip to content

Commit

Permalink
guest-component depds: Install clang and devmapper libs
Browse files Browse the repository at this point in the history
Fixes: kata-containers#5750

Signed-off-by: Suraj Deshmukh <[email protected]>
  • Loading branch information
surajssd committed Aug 18, 2023
1 parent 6ab2a91 commit fe30815
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .ci/install-guest-component-dependencies.sh
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion .ci/jenkins_job_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -307,4 +310,4 @@ case ${test_type} in
*) echo "Unknown test type." >&2 && exit 1 ;;
esac

popd
popd

0 comments on commit fe30815

Please sign in to comment.