The Blueriq Sonar Scanner can be configured by creating an application.properties file and passing it either as an command line argument with --spring.config.location=file:application.properties or placing it next to the Blueriq Sonar Scanner. See Run analysis on how to run an analysis.
Through this property file, both Blueriq Sonar Scanner properties and SonarQube Analysis Parameters can be configured.
Blueriq Sonar Scanner Properties
Property | Required | Default | Description |
---|---|---|---|
blueriq.scanner.scanName | Required | The name of the analysis which will be used in SonarQube, A scan name may only contain letters, numbers, underscores and hyphens | |
blueriq.scanner.repository | Required | Name of the repository | |
blueriq.scanner.branch | Required | Name of the branch | |
blueriq.scanner.projects | Required | A comma separated list of Blueriq project names | |
blueriq.scanner.studio.managementServiceUrl | Required for management service | Url to the management service, if this property is set then all other management service properties must also be set. If this is not set, then the branch export location must be set. | |
blueriq.scanner.studio.username | Required for management service | Studio username credential | |
blueriq.scanner.studio.password | Required for management service | Studio password credential | |
blueriq.scanner.studio.domain | Optional | Studio authentication domain, only applicable if the authentication property is set to NTLM_CUSTOM | |
blueriq.scanner.studio.timeoutInSeconds | Optional | 60 | If the calls to the management service timeout you can increase the timeout via this property. |
blueriq.scanner.studio.authenticationMethod | Required for managementservice | Studio authentication mode, currently BASIC and NTLM_CUSTOM are supported | |
blueriq.scanner.export.location | Required for export file | Location of a branch export zip from the studio, if this is set then the managementservice property must not be set. When the export location is set to a relative path, it will loaded from the location of the application.properties | |
blueriq.scanner.workDir | Optional | target | Relative path inside the executing directory where the BMA plugin creates files to index issues and measures. |
blueriq.scanner.debug | Optional | Enables the verbose mode of SonarQube for additional debugging information. | |
sonar.blueriq.license | Optional | License key string which can be found in the license.aql file. | |
sonar.blueriq.test-exclusion.business-rules | Optional | A comma separated list of business rule element names to exclude from test coverage. | |
sonar.blueriq.test-exclusion.decision-tables | Optional | A comma separated list of decision table element names to exclude from test coverage. | |
sonar.login | Required | Sonarqube user token or username | |
sonar.password | Optional | Sonarqube password when the username instead of user token is used for sonar.login |
SonarQube Analysis Parameters
An overview of all SonarQube Analysis Parameters can be found here. These parameters can be added to the same property file as the Blueriq Sonar Scanner properties.
Encrypting the studio password
By passing the password as a command line argument (using --blueriq.scanner.studio.password=PASSWORD
where PASSWORD
is replaced by the actual password) you can encrypt the password using an external tool in your CI. The following page contains an example on how to configure this in Jenkins using the credentials binding plugin:
Using secrets in Jenkins and other CI tooling should offer similar capabilities. Alternatively, the environment variable BLUERIQ_SCANNER_STUDIO_PASSWORD
environment variable can be set instead of a command line argument.