Hello,
Our goal is to enforce the quality gate on each pipeline build. However, I am not quite sure how to achieve this.
Summary:
- SonarCloud
- Enforce quality gate via Maven
- Tried to locate some formal documentation on how to achieve this.
The goal is to enforce the quality gate via the bitbucket pipeline. The line invoking the SonarCloud maven plugin:
mvn -B -Dmaven.wagon.http.pool=false org.jacoco:jacoco-maven-plugin:prepare-agent
test org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
Here is the entire pipeline section
- step: &unit_tests
name: Run unit tests and SonarCloud scan
caches:
- maven
- sonar
- yum
script:
- yum -y install dejavu-fonts-common
- >
mvn -B -Dmaven.wagon.http.pool=false org.jacoco:jacoco-maven-plugin:prepare-agent
test org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
The question is this. Given the above pipeline, how do we enforce the pipeline to fail when the quality gate fails?
Thank you for your help.
/.