diff options
author | Jessica Wagantall <jwagantall@linuxfoundation.org> | 2024-03-20 14:33:15 -0700 |
---|---|---|
committer | Jessica Wagantall <jwagantall@linuxfoundation.org> | 2024-03-20 14:39:03 -0700 |
commit | 648abef735deaa0d76d45be56c5ca5c4d291aeec (patch) | |
tree | 3e9d9d6c1893f5ec1f9100d795b8b705a530f6c2 /.github | |
parent | dea5fc2346c2633f38ec0e7bc8a7499446998292 (diff) |
CI: Add silent SonarCloud run in merge workflow
Issue-ID: CIMAN-33
Change-Id: I51bd600ce4e18e567c1ca54d7c55114e51385af6
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/gerrit-merge.yaml | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/.github/workflows/gerrit-merge.yaml b/.github/workflows/gerrit-merge.yaml index 3f61325b6..156d11b91 100644 --- a/.github/workflows/gerrit-merge.yaml +++ b/.github/workflows/gerrit-merge.yaml @@ -92,9 +92,42 @@ jobs: secrets: NEXUS_IQ_PASSWORD: ${{ secrets.NEXUS_IQ_PASSWORD }} + run-maven-sonar: + needs: notify + # yamllint disable-line rule:line-length + uses: lfit/releng-reusable-workflows/.github/workflows/composed-maven-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 }} + # yamllint disable rule:line-length + ENV_VARS: '{"MAVEN_OPTS": "--add-opens=java.base/java.util=ALL-UNNAMED"}' + ENV_SECRETS: "{}" + JDK_VERSION: "17" + MVN_PHASES: "clean install" + MVN_OPTS: >- + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn + -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r + -DaltDeploymentRepository=staging::default::file:"${GITHUB_WORKSPACE}"/m2repo + SONAR_ARGS: > + -Dsonar.organization=onap + -Dsonar.projectKey=onap_ccsdk-cds + -Dsonar.sources=src/main + -Dsonar.test.inclusions=**/*.java,**/*.kt + -Dsonar.tests=src/tests + -Dsonar.verbose=true + secrets: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + report-status: if: ${{ always() }} - needs: [notify, run-maven-clm] + needs: [notify, run-maven-clm, run-maven-sonar] runs-on: ubuntu-latest steps: - name: Get workflow conclusion |