|
9 | 9 | displayName: Analyse code with SonarQube
|
10 | 10 |
|
11 | 11 | steps:
|
12 |
| - - task: SonarCloudPrepare@1 |
| 12 | + - task: SonarCloudPrepare@2 |
13 | 13 | displayName: 'Prepare SonarCloud analysis'
|
14 | 14 | inputs:
|
15 | 15 | SonarCloud: 'SonarCloud'
|
16 | 16 | organization: 'aqualityautomation'
|
17 | 17 | scannerMode: 'CLI'
|
18 | 18 | configMode: 'file'
|
19 |
| - extraProperties: | |
20 |
| - sonar.coverage.exclusions=**/** |
| 19 | + extraProperties: 'sonar.coverage.exclusions=**/**' |
21 | 20 |
|
22 |
| - - task: Maven@3 |
| 21 | + - task: Maven@4 |
23 | 22 | displayName: 'Build project'
|
24 | 23 | inputs:
|
25 | 24 | mavenPomFile: 'pom.xml'
|
26 |
| - mavenOptions: '-Xmx3072m' |
27 |
| - javaHomeOption: 'JDKVersion' |
28 |
| - jdkVersionOption: '11' |
29 |
| - jdkArchitectureOption: 'x64' |
| 25 | + goals: 'clean' |
| 26 | + options: '-Xmx3072m' |
30 | 27 | publishJUnitResults: true
|
31 | 28 | testResultsFiles: '**/surefire-reports/TEST-*.xml'
|
32 |
| - goals: 'clean' |
| 29 | + javaHomeOption: 'JDKVersion' |
| 30 | + jdkVersionOption: '1.11' |
| 31 | + mavenVersionOption: 'Default' |
| 32 | + mavenAuthenticateFeed: false |
| 33 | + effectivePomSkip: false |
| 34 | + sonarQubeRunAnalysis: false |
33 | 35 |
|
34 |
| - - task: SonarCloudAnalyze@1 |
| 36 | + - task: SonarCloudAnalyze@2 |
| 37 | + inputs: |
| 38 | + jdkversion: 'JAVA_HOME' |
35 | 39 | displayName: 'Run SonarCloud code analysis'
|
36 | 40 | continueOnError: true
|
37 | 41 |
|
38 |
| - - task: SonarCloudPublish@1 |
| 42 | + - task: SonarCloudPublish@2 |
39 | 43 | displayName: 'Publish SonarCloud quality gate results'
|
40 | 44 | inputs:
|
41 | 45 | pollingTimeoutSec: '300'
|
@@ -89,14 +93,17 @@ jobs:
|
89 | 93 | inputs:
|
90 | 94 | displaySettings: 'optimal'
|
91 | 95 |
|
92 |
| - - task: Maven@3 |
| 96 | + - task: Maven@4 |
93 | 97 | displayName: 'Run tests'
|
94 | 98 | inputs:
|
95 | 99 | mavenPomFile: 'pom.xml'
|
96 |
| - mavenOptions: '-Xmx3072m' |
97 |
| - javaHomeOption: 'JDKVersion' |
98 |
| - jdkVersionOption: '11' |
99 |
| - jdkArchitectureOption: 'x64' |
| 100 | + goals: 'clean test -Dprofile=local' |
| 101 | + options: '-Xmx3072m' |
100 | 102 | publishJUnitResults: true
|
101 | 103 | testResultsFiles: '**/surefire-reports/TEST-*.xml'
|
102 |
| - goals: 'clean test -Dprofile=local' |
| 104 | + javaHomeOption: 'JDKVersion' |
| 105 | + jdkVersionOption: '1.11' |
| 106 | + mavenVersionOption: 'Default' |
| 107 | + mavenAuthenticateFeed: false |
| 108 | + effectivePomSkip: false |
| 109 | + sonarQubeRunAnalysis: false |
0 commit comments