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'