|
9 | 9 | displayName: Analyse code with SonarQube
|
10 | 10 |
|
11 | 11 | steps:
|
| 12 | + - task: SonarCloudPrepare@3 |
| 13 | + displayName: 'Prepare SonarCloud analysis' |
| 14 | + inputs: |
| 15 | + SonarCloud: 'SonarCloud' |
| 16 | + organization: 'aqualityautomation' |
| 17 | + scannerMode: 'CLI' |
| 18 | + configMode: 'file' |
| 19 | + extraProperties: 'sonar.coverage.exclusions=**/**' |
12 | 20 |
|
13 |
| - - task: Maven@3 |
14 |
| - displayName: 'Build project' |
15 |
| - inputs: |
16 |
| - mavenPomFile: 'pom.xml' |
17 |
| - mavenOptions: '-Xmx3072m' |
18 |
| - javaHomeOption: 'JDKVersion' |
19 |
| - jdkVersionOption: '11' |
20 |
| - jdkArchitectureOption: 'x64' |
21 |
| - publishJUnitResults: true |
22 |
| - testResultsFiles: '**/surefire-reports/TEST-*.xml' |
23 |
| - goals: 'clean' |
| 21 | + - task: Maven@4 |
| 22 | + displayName: 'Build project' |
| 23 | + inputs: |
| 24 | + mavenPomFile: 'pom.xml' |
| 25 | + goals: 'clean' |
| 26 | + publishJUnitResults: true |
| 27 | + testResultsFiles: '**/surefire-reports/TEST-*.xml' |
| 28 | + javaHomeOption: 'JDKVersion' |
| 29 | + jdkVersionOption: '1.11' |
| 30 | + mavenVersionOption: 'Default' |
| 31 | + mavenAuthenticateFeed: false |
| 32 | + effectivePomSkip: false |
| 33 | + sonarQubeRunAnalysis: false |
| 34 | + |
| 35 | + - task: SonarCloudAnalyze@3 |
| 36 | + inputs: |
| 37 | + jdkversion: 'JAVA_HOME_21_X64' |
| 38 | + displayName: 'Run SonarCloud code analysis' |
| 39 | + continueOnError: true |
| 40 | + |
| 41 | + - task: SonarCloudPublish@3 |
| 42 | + displayName: 'Publish SonarCloud quality gate results' |
| 43 | + inputs: |
| 44 | + pollingTimeoutSec: '300' |
24 | 45 |
|
25 | 46 | - job: tests
|
26 | 47 | displayName: Run tests
|
27 | 48 |
|
28 | 49 | steps:
|
29 | 50 |
|
30 |
| - - task: Maven@3 |
| 51 | + - task: Maven@4 |
31 | 52 | displayName: 'Run tests'
|
32 | 53 | inputs:
|
33 | 54 | mavenPomFile: 'pom.xml'
|
34 |
| - mavenOptions: '-Xmx3072m' |
35 |
| - javaHomeOption: 'JDKVersion' |
36 |
| - jdkVersionOption: '11' |
37 |
| - jdkArchitectureOption: 'x64' |
| 55 | + goals: 'clean test -Dprofile=local' |
38 | 56 | publishJUnitResults: true
|
39 | 57 | testResultsFiles: '**/surefire-reports/TEST-*.xml'
|
40 |
| - goals: 'test -Dprofile=local' |
| 58 | + javaHomeOption: 'JDKVersion' |
| 59 | + jdkVersionOption: '1.11' |
| 60 | + mavenVersionOption: 'Default' |
| 61 | + mavenAuthenticateFeed: false |
| 62 | + effectivePomSkip: false |
| 63 | + sonarQubeRunAnalysis: false |
0 commit comments