From: Anil Belur Date: Sun, 9 Jun 2024 23:37:08 +0000 (+1000) Subject: Fix: Skip sigul installation on Ubuntu X-Git-Tag: v0.90.9^0 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F50%2F72950%2F3;p=releng%2Fglobal-jjb.git Fix: Skip sigul installation on Ubuntu 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 --- diff --git a/releasenotes/notes/skip-sigul-on-ubuntu--c8070cceaa577da1.yaml b/releasenotes/notes/skip-sigul-on-ubuntu--c8070cceaa577da1.yaml new file mode 100644 index 00000000..26ceefea --- /dev/null +++ b/releasenotes/notes/skip-sigul-on-ubuntu--c8070cceaa577da1.yaml @@ -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. diff --git a/shell/sigul-install.sh b/shell/sigul-install.sh index 08b3b7d8..c340e6f1 100755 --- a/shell/sigul-install.sh +++ b/shell/sigul-install.sh @@ -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 diff --git a/shell/sigul-sign-dir.sh b/shell/sigul-sign-dir.sh index d3995ace..2d44cdf6 100644 --- a/shell/sigul-sign-dir.sh +++ b/shell/sigul-sign-dir.sh @@ -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/"\