X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=.github%2Fworkflows%2Fgerrit-novote-merge.yaml;fp=.github%2Fworkflows%2Fgerrit-novote-merge.yaml;h=5bd6982abbae51bcf8c2a255715fbc0e4d9f833d;hb=125f882bfdefaec856c67d1be67bd070688e7a39;hp=04736db4d3456d5762e5b8e3ee4db5862ee806b7;hpb=4cc1bb78f1a277549d0c8f608fa45c3deda00e86;p=com%2Fpylog.git diff --git a/.github/workflows/gerrit-novote-merge.yaml b/.github/workflows/gerrit-novote-merge.yaml index 04736db..5bd6982 100644 --- a/.github/workflows/gerrit-novote-merge.yaml +++ b/.github/workflows/gerrit-novote-merge.yaml @@ -41,14 +41,16 @@ on: description: "Gerrit refspec of change" required: true type: string + secrets: + SONAR_TOKEN: + description: "Sonar Cloud access token" + required: true concurrency: # yamllint disable-line rule:line-length group: gerrit-merge-${{ github.workflow }}-${{ github.event.inputs.GERRIT_CHANGE_ID || github.run_id }} cancel-in-progress: true -permissions: read-all - jobs: notify: runs-on: ubuntu-latest @@ -68,29 +70,43 @@ jobs: - name: Allow replication run: sleep 10s - call-gerrit-tox-sonarcloud: + call-gerrit-tox-and-sonarcloud: + runs-on: ubuntu-latest needs: notify - # yamllint disable-line rule:line-length - uses: lfit/releng-reusable-workflows/.github/workflows/composed-tox-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 }} - TOX_ENVS: '["py3"]' - SONAR_PROJECT_KEY: "o-ran-sc_com-pylog" - SONAR_ORG: "o-ran-sc" - SONAR_ARGS: > - -Dsonar.sources=mdclogpy - -Dsonar.python.coverage.reportPaths=./coverage.xm - -Dsonar.verbose=true - secrets: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + steps: + - name: Run Tox verify + # yamllint disable-line rule:line-length + uses: lfit/releng-reusable-workflows/.github/workflows/gerrit-compose-required-tox-verify.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 }} + TOX_ENVS: '["py3"]' + - name: Run SonarCloud Scan + uses: sonarsource/sonarcloud-github-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + with: + args: + SONAR_PROJECT_KEY: "o-ran-sc_com-pylog" + SONAR_ORG: "o-ran-sc" + SONAR_ARGS: > + -Dsonar.build.sourceEncoding=UTF-8 + -Dsonar.organization=o-ran-sc + -Dsonar.projectBaseDir=. + -Dsonar.projectKey=o-ran-sc_com-pylog + -Dsonar.projectName=com-pylog + -Dsonar.python.coverage.reportPaths=./coverage.xm + -Dsonar.sources=mdclogpy + -Dsonar.verbose=true + secrets: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} report-status: if: ${{ always() }}