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@9627b9a144f2a2cad70707ddfae87c87dce60729 # v0.8
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:
75 # yamllint disable-line rule:line-length
76 uses: lfit/releng-reusable-workflows/.github/workflows/composed-prescan-sonar-cloud.yaml@main
78 GERRIT_BRANCH: ${{ inputs.GERRIT_BRANCH }}
79 GERRIT_CHANGE_ID: ${{ inputs.GERRIT_CHANGE_ID }}
80 GERRIT_CHANGE_NUMBER: ${{ inputs.GERRIT_CHANGE_NUMBER }}
81 GERRIT_CHANGE_URL: ${{ inputs.GERRIT_CHANGE_URL }}
82 GERRIT_EVENT_TYPE: ${{ inputs.GERRIT_EVENT_TYPE }}
83 GERRIT_PATCHSET_NUMBER: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
84 GERRIT_PATCHSET_REVISION: ${{ inputs.GERRIT_PATCHSET_REVISION }}
85 GERRIT_PROJECT: ${{ inputs.GERRIT_PROJECT }}
86 GERRIT_REFSPEC: ${{ inputs.GERRIT_REFSPEC }}
88 # yamllint disable-line rule:line-length
89 PRE_BUILD_SCRIPT_URL: "https://raw.githubusercontent.com/o-ran-sc/ci-management/master/jjb/nonrtric-plt-ranpm/prescan-pm-file-converter-ubuntu.sh"
90 SONAR_PROJECTBASEDIR: pm-file-converter
92 -Dsonar.organization=o-ran-sc
93 -Dsonar.projectKey=o-ran-sc_nonrtric-plt-ranpm-pm-file-converter
94 -Dsonar.projectName=nonrtric-plt-ranpm-pm-file-converter
95 -Dsonar.build.sourceEncoding=UTF-8
97 -Dsonar.go.coverage.reportPaths=coverage.txt
98 -Dsonar.inclusions=**/**.go
99 -Dsonar.exclusions=**/*_test.go
102 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
104 run-maven-sonar-pmproducer:
106 # yamllint disable-line rule:line-length
107 uses: lfit/releng-reusable-workflows/.github/workflows/composed-maven-sonar-cloud.yaml@main
109 GERRIT_BRANCH: ${{ inputs.GERRIT_BRANCH }}
110 GERRIT_CHANGE_ID: ${{ inputs.GERRIT_CHANGE_ID }}
111 GERRIT_CHANGE_NUMBER: ${{ inputs.GERRIT_CHANGE_NUMBER }}
112 GERRIT_CHANGE_URL: ${{ inputs.GERRIT_CHANGE_URL }}
113 GERRIT_EVENT_TYPE: ${{ inputs.GERRIT_EVENT_TYPE }}
114 GERRIT_PATCHSET_NUMBER: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
115 GERRIT_PATCHSET_REVISION: ${{ inputs.GERRIT_PATCHSET_REVISION }}
116 GERRIT_PROJECT: ${{ inputs.GERRIT_PROJECT }}
117 GERRIT_REFSPEC: ${{ inputs.GERRIT_REFSPEC }}
118 # yamllint disable rule:line-length
119 ENV_VARS: '{"SONARCLOUD_QUALITYGATE_WAIT": "false","SCAN_DEV_BRANCH": "false"}'
122 MVN_POM_FILE: "pmproducer/pom.xml"
123 MVN_PHASES: "clean install"
125 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
126 -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
127 -DaltDeploymentRepository=staging::default::file:"${GITHUB_WORKSPACE}"/m2repo
128 SONAR_PROJECT_KEY: "o-ran-sc_nonrtric-plt-ranpm-pmproducer"
129 SONAR_ORG: "o-ran-sc"
134 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
136 run-maven-sonar-influxlogger:
138 # yamllint disable-line rule:line-length
139 uses: lfit/releng-reusable-workflows/.github/workflows/composed-maven-sonar-cloud.yaml@main
141 GERRIT_BRANCH: ${{ inputs.GERRIT_BRANCH }}
142 GERRIT_CHANGE_ID: ${{ inputs.GERRIT_CHANGE_ID }}
143 GERRIT_CHANGE_NUMBER: ${{ inputs.GERRIT_CHANGE_NUMBER }}
144 GERRIT_CHANGE_URL: ${{ inputs.GERRIT_CHANGE_URL }}
145 GERRIT_EVENT_TYPE: ${{ inputs.GERRIT_EVENT_TYPE }}
146 GERRIT_PATCHSET_NUMBER: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
147 GERRIT_PATCHSET_REVISION: ${{ inputs.GERRIT_PATCHSET_REVISION }}
148 GERRIT_PROJECT: ${{ inputs.GERRIT_PROJECT }}
149 GERRIT_REFSPEC: ${{ inputs.GERRIT_REFSPEC }}
150 # yamllint disable rule:line-length
151 ENV_VARS: '{"SONARCLOUD_QUALITYGATE_WAIT": "false","SCAN_DEV_BRANCH": "false"}'
154 MVN_POM_FILE: "influxlogger/pom.xml"
155 MVN_PHASES: "clean install"
157 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
158 -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
159 -DaltDeploymentRepository=staging::default::file:"${GITHUB_WORKSPACE}"/m2repo
160 SONAR_PROJECT_KEY: "o-ran-sc_nonrtric-plt-ranpm-influxlogger"
161 SONAR_ORG: "o-ran-sc"
166 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
168 run-maven-sonar-datafilecollector:
170 # yamllint disable-line rule:line-length
171 uses: lfit/releng-reusable-workflows/.github/workflows/composed-maven-sonar-cloud.yaml@main
173 GERRIT_BRANCH: ${{ inputs.GERRIT_BRANCH }}
174 GERRIT_CHANGE_ID: ${{ inputs.GERRIT_CHANGE_ID }}
175 GERRIT_CHANGE_NUMBER: ${{ inputs.GERRIT_CHANGE_NUMBER }}
176 GERRIT_CHANGE_URL: ${{ inputs.GERRIT_CHANGE_URL }}
177 GERRIT_EVENT_TYPE: ${{ inputs.GERRIT_EVENT_TYPE }}
178 GERRIT_PATCHSET_NUMBER: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
179 GERRIT_PATCHSET_REVISION: ${{ inputs.GERRIT_PATCHSET_REVISION }}
180 GERRIT_PROJECT: ${{ inputs.GERRIT_PROJECT }}
181 GERRIT_REFSPEC: ${{ inputs.GERRIT_REFSPEC }}
182 # yamllint disable rule:line-length
183 ENV_VARS: '{"SONARCLOUD_QUALITYGATE_WAIT": "false","SCAN_DEV_BRANCH": "false"}'
186 MVN_POM_FILE: "datafilecollector/pom.xml"
187 MVN_PHASES: "clean install"
189 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
190 -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
191 -DaltDeploymentRepository=staging::default::file:"${GITHUB_WORKSPACE}"/m2repo
192 SONAR_PROJECT_KEY: "o-ran-sc_nonrtric-plt-ranpm-datafilecollector"
193 SONAR_ORG: "o-ran-sc"
198 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
202 needs: [notify, call-prescan-sonarcloud, run-maven-sonar-pmproducer, run-maven-sonar-influxlogger, run-maven-sonar-datafilecollector]
203 runs-on: ubuntu-latest
205 - name: Get workflow conclusion
206 uses: technote-space/workflow-conclusion-action@v3
207 - name: Report workflow conclusion
208 # yamllint disable-line rule:line-length
209 uses: lfit/gerrit-review-action@9627b9a144f2a2cad70707ddfae87c87dce60729 # v0.8
211 host: ${{ vars.GERRIT_SERVER }}
212 username: ${{ vars.GERRIT_SSH_USER }}
213 key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
214 known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
215 gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
216 gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
217 vote-type: ${{ env.WORKFLOW_CONCLUSION }}