Add support for SONAR_QUALITYGATE_WAIT (upper snake case)

sonarScanner sonar.qualitygate.wait flags is not recognized in its upper snake case form:
SONAR_QUALITYGATE_WAIT.

This missing point doesn’t allow us to use it as an envirnoment variable (dot are not allowed in many systems).

A simple use case is with gitlab integration… we don’t have to modify all of our .gitlab-ci.yml if we can simpy put a project/group variable in gitlab ui (not supporting dot in variable names).

Hi,

Properties are generally not loaded from environment variables. Even if the property name did not have the dots, it would still not be loaded from the environment variables. It needs to be defined as a property, which can be done in several ways: Scanner properties file, command line parameters or Java system properties.

There is a way of accomplishing it with environment variables, but be warned that it’s not official and therefore it might not work with all the scanners and it can be removed/changed at any time.
You can define properties with the environment variable SONARQUBE_SCANNER_PARAMS using json.
Example:

export SONARQUBE_SCANNER_PARAMS="{ \"sonar.qualitygate.wait\" : \"true\" }".

1 Like