Feat: Add missing build script and scan configuration options 96/14196/1
authorMatthew Watkins <mwatkins@linuxfoundation.org>
Mon, 17 Feb 2025 16:38:50 +0000 (16:38 +0000)
committerMatthew Watkins <mwatkins@linuxfoundation.org>
Mon, 17 Feb 2025 16:38:50 +0000 (16:38 +0000)
Issue-ID: CIMAN-33

Change-Id: I05450b3ca07536fb30dae5841ca6a53fc57e15d2
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
.github/workflows/gerrit-novote-merge.yaml
sonar-project.properties
sonarqube-cloud-build.sh [new file with mode: 0755]

index 663a391..89259f4 100644 (file)
@@ -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() }}
index e658124..d613a58 100644 (file)
@@ -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 (executable)
index 0000000..7c77957
--- /dev/null
@@ -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 .