importing rules.csv file to sonar

2019-04-09 19:19发布

i am having a file rules.csv in ms-excel format. The rules.csv is downloaded from quality profiles of other sonar server.Now i want to implement my sonar with same quality profiles.now my questions are

  1. how to import csv file to sonar
  2. rules.csv file is enough to create the same quality profiles of other

标签: sonarqube
2条回答
啃猪蹄的小仙女
2楼-- · 2019-04-09 19:59

Steps to make a backup/reimport

  1. Go to Configuration --> Quality Profiles
  2. Click the Backup-Button of the desired profile and save the file
  3. Go to the target sonar instance
  4. Go to Configuration --> Quality Profiles
  5. Click Restore Profile (it is in the upper right corner and a bit hard to miss.)
  6. Select the previously saved file
  7. Done

Related Sonar documentation can be found here.

查看更多
走好不送
3楼-- · 2019-04-09 20:08

If you are not admin on the source sonar and you want to get the profile there will be no backup button. Try to find out the internal ID of the profile (look at the link URL in the Quality Profiles list) and then download it like this:

curl http://target-sonar-instance/profiles/backup/15 -XPOST > ~/Downloads/profile.xml

(where 15 is the ID you found)

查看更多
登录 后发表回答