二手软件:
我们使用的是SonarQube和nuget的dotnet-sonarscanner,效果很好。 不幸的是,我们无法将有关声纳波扫描和质量门的信息返回给TFS。
如果质量门未通过,我们要防止PullRequests合并。我知道,如果质量门被打破,您也不想破坏构建。
我在文档(https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Extension+for+VSTS-TFS中找到了一些内容,但是找不到诸如“管理->常规设置->拉取请求”之类的设置
背景是我们在docker构建中使用了声纳扫描仪:
dotnet tool install --global dotnet-sonarscanner --version 4.4.2
apt-get -yqq update && apt-get -yqq install openjdk-8-jre-headless > /dev/null
dotnet-sonarscanner begin /k:$BUILD_NAME /d:sonar.host.url="$SONAR_HOST" /d:sonar.login="$SONAR_LOGIN" /d:sonar.exclusions="**/bin/**/*,**/obj/**/*" /d:sonar.cs.opencover.reportsPaths=/src/opencover.xml /v:$BUILD_ID
dotnet build $UNITTEST_PROJECT
coverlet $UNITTEST_ASSEMBLY --target "dotnet" --targetargs "test $UNITTEST_PROJECT --no-build" --output /src/opencover.xml --format opencover
dotnet publish $PROJECT -c Release -o /app
dotnet-sonarscanner end /d:sonar.login="$SONAR_LOGIN"
答案 0 :(得分:0)
如果质量门未通过,我们要防止PullRequests合并。
然后质量门的构建失败。
我知道,如果质量门被打破,您也不想破坏构建。
为什么不呢?您说的是要做,希望质量门成为阻碍者,因此这会导致构建失败。