1
- # Maven
2
-
3
1
trigger :
4
2
- master
5
3
8
6
9
7
steps :
10
8
- task : SonarCloudPrepare@1
9
+ displayName : ' Prepare SonarCloud analysis'
11
10
inputs :
12
11
SonarCloud : ' SonarCloud'
13
12
organization : ' aqualityautomation'
@@ -16,11 +15,8 @@ steps:
16
15
extraProperties : |
17
16
sonar.coverage.exclusions=**/**
18
17
19
- - task : ScreenResolutionUtility@1
20
- inputs :
21
- displaySettings : ' optimal'
22
-
23
18
- task : Maven@3
19
+ displayName : ' Build project'
24
20
inputs :
25
21
mavenPomFile : ' pom.xml'
26
22
mavenOptions : ' -Xmx3072m'
@@ -29,10 +25,26 @@ steps:
29
25
jdkArchitectureOption : ' x64'
30
26
publishJUnitResults : true
31
27
testResultsFiles : ' **/surefire-reports/TEST-*.xml'
32
- goals : ' clean test -Dprofile=local '
28
+ goals : ' clean'
33
29
34
30
- task : SonarCloudAnalyze@1
31
+ displayName : ' Run SonarCloud code analysis'
32
+ continueOnError : true
35
33
36
34
- task : SonarCloudPublish@1
35
+ displayName : ' Publish SonarCloud quality gate results'
36
+ continueOnError : true
37
37
inputs :
38
- pollingTimeoutSec : ' 300'
38
+ pollingTimeoutSec : ' 300'
39
+
40
+ - task : Maven@3
41
+ displayName : ' Run tests'
42
+ inputs :
43
+ mavenPomFile : ' pom.xml'
44
+ mavenOptions : ' -Xmx3072m'
45
+ javaHomeOption : ' JDKVersion'
46
+ jdkVersionOption : ' 1.8'
47
+ jdkArchitectureOption : ' x64'
48
+ publishJUnitResults : true
49
+ testResultsFiles : ' **/surefire-reports/TEST-*.xml'
50
+ goals : ' clean test'
0 commit comments