Page History
...
The Blueriq Quality Gate called bma-qualitygate-installer.jar can be runs by using java -jar bma-qualitygate-installer.jar. When running this command you will be prompted with several questions.
Prompt | Input |
---|---|
hostname | The url to your SonarQube instance. This should be either yoururl.here[:PORT] or http[s]://yoururl.here[:PORT]/ |
username | A username for a user with the Administer Quality Gates permission. (default: admin) |
password | The password for the above mentioned user. (default: admin) |
Clean install? (y/n) | Decide whether to delete the current quality gate and overwrite it with a new one. If the answer is not "Y", the script will only install missing conditions. |
Info | ||
---|---|---|
| ||
It is possible pass command line arguments into the bma-qualitygate-installer.jar for information see Quality Gate Installer. |
...
See the User documentation on how to execute an analysis of your Blueriq Models.
Enforcing the Quality Gate in a Jenkins pipeline
To enforce the Quality Gate in Jenkins you can use the SonarQube Scanner plugin. To configure the BMA you can follow the provided example configuration of this plugin. The only way the BMA configuration deviates from this example is in the way it triggers the analysis.
Instead of using the "sh 'mvn clean package sonar:sonar'" command, use the "java -jar <location on disk>\bma-sonar-scanner.jar" command to trigger the analysis.
Example pipeline:
Code Block |
---|
pipeline {
agent none
stages {
stage("BMA SonarQube analysis") {
agent any
steps {
withSonarQubeEnv('My SonarQube Server') {
java -Dspring.config.location=file:C:\bma\application.properties -jar C:\bma\bma-sonar-scanner.jar
}
}
}
stage("Quality Gate") {
steps {
timeout(time: 1, unit: 'HOURS') {
waitForQualityGate abortPipeline: true
}
}
}
}
} |