Skip to content

Commit

Permalink
Fix: Skip sigul installation on Ubuntu
Browse files Browse the repository at this point in the history
Skip sigul installation on Ubuntu, since the CentOS
docker container handles the installation during container
creation.

Issue: RELENG-5419
Change-Id: I716f4f36d90ddad648725ccbe9f8d48a74abd549
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
  • Loading branch information
askb committed Jun 10, 2024
1 parent e66f993 commit 7482b27
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
issues:
- |
Sigul install is available only on CentOS based patforms.
fixes:
- |
Skip sigul installation on Ubuntu, since the CentOS docker container handles
the installation during container creation.
6 changes: 6 additions & 0 deletions shell/sigul-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ echo "---> sigul-install.sh"
# Ensure we fail the job if any steps fail.
set -e -o pipefail

OS=$(facter operatingsystem | tr '[:upper:]' '[:lower:]')
if ! [[ "${OS}" =~ ^(fedora|centos|redhat) ]]; then
echo "INFO: Skip step, sigul install not available on platform ${OS}"
exit 0
fi

if command -v sigul &>/dev/null; then
echo "Sigul already installed; skipping installation."
else
Expand Down
6 changes: 4 additions & 2 deletions shell/sigul-sign-dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ set -e -o pipefail
lf-activate-venv --python python3 lftools

OS=$(facter operatingsystem | tr '[:upper:]' '[:lower:]')
OS_RELEASE=$(facter lsbdistrelease | tr '[:upper:]' '[:lower:]')
if [[ "$OS_RELEASE" == "8" && "$OS" == 'centos' ]]; then
OS_DIST_RELEASE=$(facter lsbdistrelease | tr '[:upper:]' '[:lower:]')
OS_RELEASE=$(facter operatingsystemrelease | tr '[:upper:]' '[:lower:]')
if [[ "$OS_DIST_RELEASE" == "8" && "${OS}" =~ ^(fedora|centos|redhat)$ ]] || \
[[ "$OS_RELEASE" =~ ^(20.04|22.04)$ && "${OS}" =~ ^(ubuntu|debian)$ ]]; then
# Get Dockerfile and the enterpoint to build the docker image.
# shellcheck disable=SC2140
wget -O "${WORKSPACE}/sigul-sign.sh" "https://raw.githubusercontent.com/"\
Expand Down

0 comments on commit 7482b27

Please sign in to comment.