A previous article guided you through setting up your repository. You did this by creating multiple branches that reflect the GitFlow model and protecting those branch use policies. Then, I gave you an overview of how pull requests work. This article — the final installment in the Azure series — will show you how to implement Azure’s continuous testing, integration, and deployment mechanisms.
Continuous Integration (CI) is a practice that allows multiple developers to frequently merge code changes into a remote repository by automating the build, test, and run processes. To implement your own CI pipeline in Azure, follow these steps:
trigger:
- main
pool:
vmImage: ubuntu-latest
variables
buildConfiguration: 'Release'
steps:
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
As mentioned before, the continuous integration pipeline can perform both static and dynamic tests automatically. Static testing is a technique to improve the quality of your application by detecting bugs, vulnerabilities, and code smells without executing your application’s code. Dynamic testing, on the other hand, focuses on the behavior of your application; it requires execution of your application’s code.
This tutorial will teach you how to perform static testing using SonarCloud.
To be able to use the SonarCloud functionalities, you must install the SonarCloud extension in your organization using the following steps:
#microsoft #azure-devops #continuous-integration #testing