From 681ba85e3c8f3f6c828187aeffe8e6879622c6bb Mon Sep 17 00:00:00 2001 From: shaed-parkar <41630528+shaed-parkar@users.noreply.github.com> Date: Mon, 7 Oct 2024 16:32:33 +0100 Subject: [PATCH] VIH-10843 add sonar to master build (#165) --- azure-pipelines.sds.master-release.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/azure-pipelines.sds.master-release.yml b/azure-pipelines.sds.master-release.yml index 80f7a2cf..e98c65b8 100644 --- a/azure-pipelines.sds.master-release.yml +++ b/azure-pipelines.sds.master-release.yml @@ -64,6 +64,31 @@ stages: vstsFeed: "${{ variables.nuget_org_name }}/${{ variables.nuget_feed_name }}" gitVersionConfigPath: ${{ variables.git_version_config_path }} +##################################################### +# CI Build Tasks. ################################### +- stage: CI_Build + dependsOn: [] + variables: + - template: variables/shared.yaml + displayName: Test & Sonar + jobs: + - job: UnitAndIntegrationTests + displayName: 'Unit and Integration Tests' + steps: + - checkout: self + + - template: templates/dotnet/build-test-analyse.yml@azTemplates + parameters: + dotnetVersion: ${{ variables.dotnetVersion }} + nugetConfigPath: nuget.config + appName: ${{ variables.appName }} + dockerComposeTestFile: docker-compose.tests.yml + sonarExtraProperties: | + sonar.cs.opencover.reportsPaths=$(System.DefaultWorkingDirectory)/coverage.opencover.xml + sonar.cpd.exclusions=**/NotificationType.cs,**/TemplateDataForEnvironments.cs,*/Validations/*.cs,**/Services/NotificationParameterMapper.cs + sonar.exclusions=**/Program.cs, **/Startup.cs, **/Testing.Common/**/*, **/NotificationApi/Swagger/**/*, NotificationApi/NotificationApi.DAL/Migrations/*, NotificationApi/NotificationApi.DAL/TemplateDataForEnvironments.cs + sonar.coverage.exclusions=**/NotificationApi/Swagger/**/*, **/Program.cs, **/Startup.cs, **/Testing.Common/**/*, **/NotificationApi.Common/**/*, **/NotificationApi.IntegrationTests/**/*, **/NotificationApi.UnitTests/**/*, **/NotificationApi/Extensions/*, **/NotificationApi.DAL/Migrations/**/* + ##################################################### # Manual Approval ################################### - ${{ each stage in parameters.stages }}: