4 # yamllint disable-line rule:truthy
9 description: "Branch that change is against"
13 description: "The ID for the change"
17 description: "The Gerrit number"
21 description: "URL to the change"
25 description: "Type of Gerrit event"
28 GERRIT_PATCHSET_NUMBER:
29 description: "The patch number for the change"
32 GERRIT_PATCHSET_REVISION:
33 description: "The revision sha"
37 description: "Project in Gerrit"
41 description: "Gerrit refspec of change"
46 description: "Sonar Cloud access token"
50 # yamllint disable-line rule:line-length
51 group: gerrit-merge-${{ github.workflow }}-${{ github.event.inputs.GERRIT_CHANGE_ID || github.run_id }}
52 cancel-in-progress: true
56 runs-on: ubuntu-latest
58 - name: Notify job start
59 # yamllint disable-line rule:line-length
60 uses: lfit/gerrit-review-action@7c30179c3c9389545fccb0d458df59879372ae6a # v0.6
62 host: ${{ vars.GERRIT_SERVER }}
63 username: ${{ vars.GERRIT_SSH_USER }}
64 key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
65 known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
66 gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
67 gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
70 - name: Allow replication
73 call-gerrit-tox-and-sonarcloud:
74 runs-on: ubuntu-latest
77 - name: Run Tox verify
78 # yamllint disable-line rule:line-length
79 uses: lfit/releng-reusable-workflows/.github/workflows/gerrit-compose-required-tox-verify.yaml@main
81 GERRIT_BRANCH: ${{ inputs.GERRIT_BRANCH }}
82 GERRIT_CHANGE_ID: ${{ inputs.GERRIT_CHANGE_ID }}
83 GERRIT_CHANGE_NUMBER: ${{ inputs.GERRIT_CHANGE_NUMBER }}
84 GERRIT_CHANGE_URL: ${{ inputs.GERRIT_CHANGE_URL }}
85 GERRIT_EVENT_TYPE: ${{ inputs.GERRIT_EVENT_TYPE }}
86 GERRIT_PATCHSET_NUMBER: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
87 GERRIT_PATCHSET_REVISION: ${{ inputs.GERRIT_PATCHSET_REVISION }}
88 GERRIT_PROJECT: ${{ inputs.GERRIT_PROJECT }}
89 GERRIT_REFSPEC: ${{ inputs.GERRIT_REFSPEC }}
91 - name: Run SonarCloud Scan
92 uses: sonarsource/sonarcloud-github-action@master
94 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
97 SONAR_PROJECT_KEY: "o-ran-sc_com-pylog"
100 -Dsonar.build.sourceEncoding=UTF-8
101 -Dsonar.organization=o-ran-sc
102 -Dsonar.projectBaseDir=.
103 -Dsonar.projectKey=o-ran-sc_com-pylog
104 -Dsonar.projectName=com-pylog
105 -Dsonar.python.coverage.reportPaths=./coverage.xm
106 -Dsonar.sources=mdclogpy
109 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
113 needs: [notify, call-gerrit-tox-sonarcloud]
114 runs-on: ubuntu-latest
116 - name: Get workflow conclusion
117 uses: technote-space/workflow-conclusion-action@v3
118 - name: Report workflow conclusion
119 # yamllint disable-line rule:line-length
120 uses: lfit/gerrit-review-action@7c30179c3c9389545fccb0d458df59879372ae6a # v0.6
122 host: ${{ vars.GERRIT_SERVER }}
123 username: ${{ vars.GERRIT_SSH_USER }}
124 key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
125 known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
126 gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
127 gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
128 vote-type: ${{ env.WORKFLOW_CONCLUSION }}