It seems like the Build Breaker Plugin is no longer compatible with SonarQube 5.2. Is there any alternative to have a (VSO) build fail if a Sonar gate is not fulfilled or are there plans to update the Build Breaker Plugin to 5.2?
相关问题
- Docker task in Azure devops won't accept "$(pw
- Authentication Failure using Git-LFS Azure DevOps
- Authentication Failure using Git-LFS Azure DevOps
- Getting error: File extension specified '.webt
- “No test result files matching **/*.trx were found
相关文章
- Build errors of missing packages in Visual Studio
- SonarQube: How to suppress a warning in Kotlin cod
- VSTS continuous integration triggers not working
- How do I make a TeamCity build appear in the TFS B
- @Nullable and SonarQube 'Conditionally execute
- How to Move TFS 2010 Build Definition between Proj
- Close a work item via the commit message
- Increment variable value in TFS build +1
There is not (for now) any plugin which will break build when Quality Gate did't pass on SonarQube 5.2.
But for SonarQube 5.3+ you can again use Build Breaker plugin.
From mailing list:
Breaking the build in SonarQube 5.2 (21/Oct/2015)
This issue SONAR-6763 is planned for SonarQube 6.X.
You can now use the SonarQube Build Breaker Plugin with version SonarQube version 5.3+.
In SonarQube 5.2 we found alternative way in usage of Web Service /api/events.
Request example:
Response example:
Detecting RED status of the project:
To verify RED status you will need to find
event
with highestid
value inevents
list from response and then verify thatname
of this event is starting fromRed
and if you will find it you will need to fail build.Such verification can be done just on CI server using additional command line step after SQ step or it can be done from build automation system like Maven or Gradle.
We didn't implement such workaround yet in our project, just because of lack free time, but we will do this in near future.
Proposed solution should be used only as workaround until issue SONAR-6763 will be done.
With SonarQube 5.3 a new Quality Gates Web Service was introduced which could be called and used to break the build.
I've also added an issue to enhance the VSTS Tasks with an option to automatically call this service.
Update: A recent PR added this feature to the VSTS Task (not released yet)