CI: Add silent prescan SonarCloud job 05/12705/3
authorJessica Wagantall <jwagantall@linuxfoundation.org>
Tue, 9 Apr 2024 00:52:56 +0000 (17:52 -0700)
committerMatthew Watkins <mwatkins@linuxfoundation.org>
Tue, 23 Apr 2024 10:16:22 +0000 (11:16 +0100)
Add call-prescan-sonarcloud-servicemanager call

Change-Id: I61bc322000fa90a1d4b8a5d419cf90fefb400fed
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
.github/workflows/gerrit-novote-merge.yaml

index 92cb13c..ec2274c 100644 (file)
@@ -57,7 +57,7 @@ jobs:
     steps:
       - name: Notify job start
         # yamllint disable-line rule:line-length
-        uses: lfit/gerrit-review-action@7c30179c3c9389545fccb0d458df59879372ae6a  # v0.6
+        uses: lfit/gerrit-review-action@9627b9a144f2a2cad70707ddfae87c87dce60729  # v0.8
         with:
           host: ${{ vars.GERRIT_SERVER }}
           username: ${{ vars.GERRIT_SSH_USER }}
@@ -70,7 +70,7 @@ jobs:
       - name: Allow replication
         run: sleep 10s
 
-  call-prescan-sonarcloud:
+  call-prescan-sonarcloud-capifcore:
     needs: notify
     # yamllint disable-line rule:line-length
     uses: lfit/releng-reusable-workflows/.github/workflows/composed-prescan-sonar-cloud.yaml@main
@@ -101,16 +101,47 @@ jobs:
     secrets:
       SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
 
+  call-prescan-sonarcloud-servicemanager:
+    needs: notify
+    # yamllint disable-line rule:line-length
+    uses: lfit/releng-reusable-workflows/.github/workflows/composed-prescan-sonar-cloud.yaml@main
+    with:
+      GERRIT_BRANCH: ${{ inputs.GERRIT_BRANCH }}
+      GERRIT_CHANGE_ID: ${{ inputs.GERRIT_CHANGE_ID }}
+      GERRIT_CHANGE_NUMBER: ${{ inputs.GERRIT_CHANGE_NUMBER }}
+      GERRIT_CHANGE_URL: ${{ inputs.GERRIT_CHANGE_URL }}
+      GERRIT_EVENT_TYPE: ${{ inputs.GERRIT_EVENT_TYPE }}
+      GERRIT_PATCHSET_NUMBER: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
+      GERRIT_PATCHSET_REVISION: ${{ inputs.GERRIT_PATCHSET_REVISION }}
+      GERRIT_PROJECT: ${{ inputs.GERRIT_PROJECT }}
+      GERRIT_REFSPEC: ${{ inputs.GERRIT_REFSPEC }}
+      JDK_VERSION: "17"
+      # yamllint disable-line rule:line-length
+      PRE_BUILD_SCRIPT_URL: "https://raw.githubusercontent.com/o-ran-sc/ci-management/master/jjb/nonrtric-plt-sme/prescan-servicemanager-ubuntu.sh"
+      SONAR_PROJECTBASEDIR: servicemanager
+      SONAR_ARGS: >
+        -Dsonar.organization=o-ran-sc
+        -Dsonar.projectKey=o-ran-sc_nonrtric-plt-sme-servicemanager
+        -Dsonar.projectName=nonrtric-plt-sme-servicemanager
+        -Dsonar.build.sourceEncoding=UTF-8
+        -Dsonar.language=go
+        -Dsonar.go.coverage.reportPaths=coverage.txt
+        -Dsonar.inclusions=**/**.go
+        -Dsonar.exclusions=**/*_test.go
+        -Dsonar.verbose=true
+    secrets:
+      SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+
   report-status:
     if: ${{ always() }}
-    needs: [notify, call-prescan-sonarcloud]
+    needs: [notify, call-prescan-sonarcloud-capifcore, call-prescan-sonarcloud-servicemanager]
     runs-on: ubuntu-latest
     steps:
       - name: Get workflow conclusion
         uses: technote-space/workflow-conclusion-action@v3
       - name: Report workflow conclusion
         # yamllint disable-line rule:line-length
-        uses: lfit/gerrit-review-action@7c30179c3c9389545fccb0d458df59879372ae6a  # v0.6
+        uses: lfit/gerrit-review-action@9627b9a144f2a2cad70707ddfae87c87dce60729  # v0.8
         with:
           host: ${{ vars.GERRIT_SERVER }}
           username: ${{ vars.GERRIT_SSH_USER }}