Once the Sonar scanner has completed, we should report back to Gerrit with a useful report or link to SonarCloud result page.
From a discussion between @hashar and @zeljkofilipin , a first pass can be done in Zuul.
In zuul/parameter_functions.py we would need to tweak the `set_parameters()` function. When `job.name == 'wmf-sonar-scanner'` inject a new parameter:
```
params['WMF_SONAR_PROJECT_ID'] = params['ZUUL_PROJECT'].replace('/', '-')
# example: WMF_SONAR_PROJECT_ID='mediawiki-extensions-Example'
```
This way the build will have a parameter with the format expected by SonarCloud (which apparently does not support slashes in a project id). Update the Jenkins job for Sonar scanner to use that new parameter instead of forging an id from ZUUL_PROJECT.
When the build has completed, zuul can lookup that parameter from the build result when it crafts the URL that will be reported back to Gerrit. In zuul/layout.yaml:
```
- job:
- name: wmf-sonar-scanner
success-pattern: 'https://sonarcloud.io/organizations/wmftest/projects?id={build.parameters[WMF_SONAR_PROJECT_ID]}'
```
The `success-parameter` is formatted by zuul using `str.format()` and is passed the build result object.