pipeline工具研究
SonarQube
版本比較
SonarCloud只針對開發人員報告,跟sonarqube Community一樣(企業版有更多分析的報表)
SonarCloud跟雲端集成,不需要管理版本,SonarQube需要自己管理版本
SonarCloud要收費,SonarQube Community免費
SonarQube Community : Azure pipelines will work on master branch only
SonarQube Developer : Azure pipelines will work on master branches, other branches and for PR decoration
SonarCloud : Work like the SQ Developer edition.
安裝流程
整合SonarQube Server可連結到Azure DevOps
在Azure DevOps的 UserSetting -> Personal Access Tokens 建立一個 Code > Read & Write 的權杖
在SonarQube Server的 Administration -> DevOps Platform Integrations -> Azure DevOps-> Create a configuration 輸入相關資料跟權杖
在SonarQube Server建立Project
Project -> create project -> From Azure DevOps 選專案
透過Azure Pipelines進行分析
複製第三步的 Project Key,之後Pipeline要用
在SonarQube Server建立Token
MyAccount -> Security -> Generate Tokens
Token Name,之後Service Connection要用
Type: Global/Project Analysis Token
建立 http://localhost:9000 的外網連結
安裝Azure DevOps套件 SonarQube
在Azure DevOps建立Service Connection
Project -> Project Setting -> Service connections 選擇SonarQube
Server Url = http://localhost:9000 的外網連結
Token = 第4點的Token
Service connection name,之後Pipeline要用
建立Pipeline
以上部署完成。執行完分析後,報告會在SonarQube Server頁面上出現
Mend Bolt
https://docs.mend.io/bundle/community_tools/page/mend_bolt_for_azure_pipelines.html
https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/connect-organization-to-azure-ad?view=azure-devops
https://portal.azure.com/
Last updated