From: Matthew Watkins Date: Mon, 17 Feb 2025 16:38:50 +0000 (+0000) Subject: Feat: Add missing build script and scan configuration options X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=67f02294184cce2a10a3708b29edcf24284ab179;p=o-du%2Fl2.git Feat: Add missing build script and scan configuration options Issue-ID: CIMAN-33 Change-Id: I05450b3ca07536fb30dae5841ca6a53fc57e15d2 Signed-off-by: Matthew Watkins --- diff --git a/.github/workflows/gerrit-novote-merge.yaml b/.github/workflows/gerrit-novote-merge.yaml index 663a391b2..89259f4f6 100644 --- a/.github/workflows/gerrit-novote-merge.yaml +++ b/.github/workflows/gerrit-novote-merge.yaml @@ -77,6 +77,10 @@ jobs: uses: lfit/releng-reusable-workflows/.github/workflows/reuse-sonarqube-cloud.yaml@main secrets: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + with: + # yamllint disable-line rule:line-length + build_wrapper_url: "https://raw.githubusercontent.com/o-ran-sc/o-du-l2/refs/heads/main/sonarqube-cloud-build.sh" + build_wrapper_out_dir: build/odu/bin/ report-status: if: ${{ always() }} diff --git a/sonar-project.properties b/sonar-project.properties index e65812468..d613a581a 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,2 +1,4 @@ sonar.organization=o-ran-sc sonar.projectKey=o-du-l2 +sonar.sources=src +sonar.cfamily.compile-commands=compile_commands.json diff --git a/sonarqube-cloud-build.sh b/sonarqube-cloud-build.sh new file mode 100755 index 000000000..7c77957c5 --- /dev/null +++ b/sonarqube-cloud-build.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +sudo apt-get -y update +sudo apt-get -y install libnsl-dev libxml2-dev libsctp-dev libpcap-dev +cd build; make +cd - +LOCATION=$(find . -name compile_commands.json) +echo "Build wrapper output file: $LOCATION" +mv $LOCATION .