From 046bc13b744b90ef52ba7cd6b82b6a95713851e3 Mon Sep 17 00:00:00 2001 From: James Flynn Date: Mon, 1 Mar 2021 22:56:13 +0000 Subject: [PATCH] Changed: Using Mvn task sonar scan --- azure-pipelines.yml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c488d4ead..32302af48 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,28 +22,25 @@ jobs: inputs: SonarCloud: 'sonarcloud-svc-connection' organization: 'james-flynn-ie' - scannerMode: 'CLI' + scannerMode: 'Other' configMode: 'manual' - cliProjectKey: 'james-flynn-ie_spring-petclinic' - cliProjectName: 'spring-petclinic' - cliSources: '.' - extraProperties: 'sonar.branch.name=$(Build.SourceBranchName) sonar.language=java sonar.projectKey=james-flynn-ie_spring-petclinic' + projectKey: 'james-flynn-ie_spring-petclinic' + projectName: 'spring-petclinic' + extraProperties: 'sonar.branch.name=$(Build.SourceBranchName) sonar.language=java' - task: Maven@3 displayName: 'Maven Build, Test and Package' inputs: mavenPomFile: 'pom.xml' - mavenOptions: '-Xmx3072m' + publishJUnitResults: true + testResultsFiles: '**/TEST-*.xml' + testRunTitle: '$(Build.BuildNumber)' javaHomeOption: 'JDKVersion' jdkVersionOption: '1.11' - jdkArchitectureOption: 'x64' - publishJUnitResults: true - testRunTitle: '$(Build.BuildNumber)' - testResultsFiles: '**/TEST-*.xml' - goals: 'package' - - - task: SonarCloudAnalyze@1 - displayName: 'Run Sonarcloud Code Analysis' + mavenVersionOption: 'Default' + mavenOptions: '-Xmx3072m' + sonarQubeRunAnalysis: true + sqMavenPluginVersionChoice: 'latest' - task: SonarCloudPublish@1 displayName: 'Publish Quality Gate Result on SonarCloud'