From: Alok Bhatt Date: Sat, 24 Oct 2020 14:24:53 +0000 (+0000) Subject: This change adds the job to trigger sonar scans on the com-gs-lite repo. X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F18%2F4918%2F2;p=ci-management.git This change adds the job to trigger sonar scans on the com-gs-lite repo. Issue-ID: RIC-670 Signed-off-by: Alok Bhatt Change-Id: I558968d6f1854121fd935d05c62f66d2840caa83 --- diff --git a/jjb/com-gs-lite/prescan-com-gs-lite-ubuntu.sh b/jjb/com-gs-lite/prescan-com-gs-lite-ubuntu.sh new file mode 100644 index 00000000..df5c570f --- /dev/null +++ b/jjb/com-gs-lite/prescan-com-gs-lite-ubuntu.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +echo "---> cmake-sonarqube.sh starts" + +CMAKE_OPTS= +BUILD_DIR=$WORKSPACE/src +BUILD_WRAP_DIR=$WORKSPACE/bw-output + + +build_dir="${BUILD_DIR:-$WORKSPACE/build}" +build_wrap_dir="${BUILD_WRAP_DIR:-$WORKSPACE/bw-output}" +cmake_opts="${CMAKE_OPTS:-}" +make_opts="${MAKE_OPTS:-}" + +cd src || exit 1 +wget -q -O bw.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip +unzip -q bw.zip +sudo mv build-wrapper-* /opt/build-wrapper + +mkdir -p "$build_dir" +cd "$build_dir" || exit 1 + + +# $make_opts may be empty. +# shellcheck disable=SC2086 +/opt/build-wrapper/build-wrapper-linux-x86-64 --out-dir "$build_wrap_dir" make $make_opts + +echo "---> cmake-sonarqube.sh ends"