From 6bf043b36b3c5193008d39a901753bcea093d2b2 Mon Sep 17 00:00:00 2001 From: Jessica Wagantall Date: Mon, 8 Apr 2024 17:52:56 -0700 Subject: [PATCH] CI: Add silent prescan SonarCloud job Add call-prescan-sonarcloud-servicemanager call Change-Id: I61bc322000fa90a1d4b8a5d419cf90fefb400fed Signed-off-by: Jessica Wagantall --- .github/workflows/gerrit-novote-merge.yaml | 39 +++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gerrit-novote-merge.yaml b/.github/workflows/gerrit-novote-merge.yaml index 92cb13c..ec2274c 100644 --- a/.github/workflows/gerrit-novote-merge.yaml +++ b/.github/workflows/gerrit-novote-merge.yaml @@ -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 }} -- 2.16.6