API Requests format in gitlab

十年热恋 提交于 2019-12-13 02:56:47

问题


I am pretty new to Gitlab and Sonarqube. Getting my code coverage of my pipeline in my sonarqube. Now I want to call the metrics of my code coverage in Gitlab. I have updated my gitlab.ci.yml file to get the api response and have added this URL "http://sonarqube.dev.aws.nervo.com/component_measures/domain/Coverage?id=com.nervo.microservices%3Adelivery/api/resource=delivery&metrics=ncloc,coverage"

When checked in postman for any response,it failed.

Goal: The goal is that on consecutive runs of the pipeline, code coverage has to be at least equal to the previous run. So if the last run had code coverage of 75%, the pipeline will not succeed until the coverage is at least 75%. If I now have code coverage at 76%, then that is the new bar. Any help on how to achieve this?

Thoughts: Call API response to check the code coverage for the previous build. And if it doesn't meets the bar, it will fail. I somehow have to update the YML file to check this. Don't know how to meet this.

Please help!! TIA

Sonarqube Version: 6.5

来源:https://stackoverflow.com/questions/54557015/api-requests-format-in-gitlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!