Currently I’ve got sonar cloud integration setup on my in my gitab CI using the following configuration:
sonar_verify:
stage: verify
allow_failure: true
script:
- echo ${SONAR_TOKEN} ${SONAR_HOST_URL}
- ./mvnw sonar:sonar
only:
- master
- develop
- merge_requests
An excerpt from this gitlabci configuration file. Gitlab CI indeed does read the configuration (as seen by this pipeline log), but the plugin just refuses to acknowledge the environment variable.
While writing this post I did indeed find what was up. Please do update the guideline to include which version of the plugin should be ** at least ** used to support the environment variables as well as your documentation, since it still contains mentions of 3.6 which does not support environment variables.
