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-prescan-sonarcloud:
76 # yamllint disable-line rule:line-length
77 uses: lfit/releng-reusable-workflows/.github/workflows/composed-prescan-sonar-cloud.yaml@main
79 GERRIT_BRANCH: ${{ inputs.GERRIT_BRANCH }}
80 GERRIT_CHANGE_ID: ${{ inputs.GERRIT_CHANGE_ID }}
81 GERRIT_CHANGE_NUMBER: ${{ inputs.GERRIT_CHANGE_NUMBER }}
82 GERRIT_CHANGE_URL: ${{ inputs.GERRIT_CHANGE_URL }}
83 GERRIT_EVENT_TYPE: ${{ inputs.GERRIT_EVENT_TYPE }}
84 GERRIT_PATCHSET_NUMBER: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
85 GERRIT_PATCHSET_REVISION: ${{ inputs.GERRIT_PATCHSET_REVISION }}
86 GERRIT_PROJECT: ${{ inputs.GERRIT_PROJECT }}
87 GERRIT_REFSPEC: ${{ inputs.GERRIT_REFSPEC }}
89 # yamllint disable-line rule:line-length
90 PRE_BUILD_SCRIPT_URL: "https://raw.githubusercontent.com/o-ran-sc/ci-management/master/jjb/com-golog/prescan-golog-go-ubuntu.sh"
91 SONAR_PROJECT_KEY: "o-ran-sc_com-golog"
94 -Dsonar.projectName=com-golog
95 -Dsonar.build.sourceEncoding=UTF-8
98 -Dsonar.go.coverage.reportPaths=**/cover.out
99 -Dsonar.inclusions=**/*.go
100 -Dsonar.exclusions=**/*_test.go
103 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
107 needs: [notify, call-prescan-sonarcloud]
108 runs-on: ubuntu-latest
110 - name: Get workflow conclusion
111 uses: technote-space/workflow-conclusion-action@v3
112 - name: Report workflow conclusion
113 # yamllint disable-line rule:line-length
114 uses: lfit/gerrit-review-action@7c30179c3c9389545fccb0d458df59879372ae6a # v0.6
116 host: ${{ vars.GERRIT_SERVER }}
117 username: ${{ vars.GERRIT_SSH_USER }}
118 key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
119 known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
120 gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
121 gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
122 vote-type: ${{ env.WORKFLOW_CONCLUSION }}