The Sonar Cloud provides a tool to assist in the analysis of technical debt in software projects also allowing to find possible bugs and vulnerabilities acting as a support platform in improving the quality of projects.
Sonar can be integrated with services such as Azure DevOps, Github, Gitlab, Bitbucket, and many others allowing you to upgrade to each version generated.
Items needed in your environment
- An active account on the platform DevPrime and developer or enterprise use license.
- DevPrime CLI installed and active (
- An active account on the Sonar Cloud
- One new microservice creating using the DevPrime platform.
- An account and a GIT repository in the Azure DevOps.
**Creating and obtaining project credentials
The first step is to create a new project and get the SONAR_TOKEN
Creating Azure Pipeline yaml
Create a new file in the project folder with the name “azure-pipelines.yml”
and add the contents of the yaml.
Creating a New Pipeline in Azure DevOps
Follow the steps in the Azure DevOps portal to create a new Pipeline using the file “azure-pipelines.yml” exists.
- New pipeline
- Azure Repos Git
- Existing Azure Pipelines YAML file
Find and click the “Variables” button to create the new “SONAR_CLOUD_TOKEN” and add the token value obtained in the Sonar Cloud.
Start the Pipeline you just created. At the end the result will be published in Sonar Cloud.
Viewing in the Sonar Cloud portal
With each Build in Azure DevOps the result is published to sonar cloud so you can keep up with the technical evolution of development.
Last modified March 14, 2022 (134cd69)