@@ -14,11 +14,11 @@ trigger:
1414 include :
1515 - src/*
1616 exclude :
17+ - .gradle/wrapper
1718 - .gitignore
1819 - CONTRIBUTING.md
1920 - LICENSE
2021 - THIRD PARTY NOTICES
21- - build.gradle
2222 - gradle.properties
2323 - gradlew
2424 - gradlew.bat
@@ -29,96 +29,12 @@ trigger:
2929pr : none
3030
3131pool :
32- vmImage : ' windows-latest'
32+ vmImage : windows-latest
3333
3434steps :
35- - checkout : self
36- clean : true
37- fetchDepth : 1
38-
39- - task : securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
40- displayName : ' Run CredScan'
41- inputs :
42- debugMode : false
43-
44- - pwsh : ' Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_x64_windows_hotspot_15.0.2_7.zip -OutFile OpenJDK.zip'
45- displayName : ' Download JDK'
46-
47- - task : JavaToolInstaller@0
48- inputs :
49- versionSpec : ' 15'
50- jdkArchitectureOption : ' x64'
51- jdkSourceOption : ' LocalDirectory'
52- jdkFile : ' OpenJDK.zip'
53- jdkDestinationDirectory : ' binaries'
54-
55- - task : DownloadSecureFile@1
56- inputs :
57- secureFile : ' local.properties'
58-
59- - task : DownloadSecureFile@1
60- inputs :
61- secureFile : ' secring.gpg'
62-
63- - task : DownloadSecureFile@1
64- inputs :
65- secureFile : ' secring.gpg.lock'
66-
67- - task : CopyFiles@2
68- inputs :
69- SourceFolder : ' $(Agent.TempDirectory)'
70- Contents : ' **'
71- TargetFolder : ' $(System.DefaultWorkingDirectory)'
72-
73- - task : Gradle@2
74- inputs :
75- gradleWrapperFile : ' gradlew'
76- tasks : ' build'
77- publishJUnitResults : true
78- testResultsFiles : ' **/TEST-*.xml'
79- javaHomeOption : ' JDKVersion'
80- sonarQubeRunAnalysis : false
81-
82- - task : PublishCodeCoverageResults@1
83- inputs :
84- codeCoverageTool : ' JaCoCo'
85- summaryFileLocation : $(System.DefaultWorkingDirectory)/build/reports/jacoco/test/jacocoTestReport.xml
86- pathToSources : $(System.DefaultWorkingDirectory)/src/main/java
87- failIfCoverageEmpty : true
88-
89- - task : PublishBuildArtifacts@1
90- displayName : ' Publish Artifact: drop'
91- inputs :
92- PathtoPublish : ' $(Build.ArtifactStagingDirectory)'
93-
94- - task : CopyFiles@2
95- inputs :
96- SourceFolder : ' $(System.DefaultWorkingDirectory)'
97- Contents : |
98- **/libs/*
99- build/generated-pom.xml
100- build/generated-pom.xml.asc
101- build.gradle
102- gradlew
103- gradlew.bat
104- settings.gradle
105- gradle.properties
106- **/gradle/**
107- Scripts/**
108- TargetFolder : ' $(Build.ArtifactStagingDirectory)/'
109-
110- - task : PublishBuildArtifacts@1
111- inputs :
112- PathtoPublish : ' $(Build.ArtifactStagingDirectory)'
113- ArtifactName : ' drop'
114- publishLocation : ' Container'
115-
116- - task : YodLabs.O365PostMessage.O365PostMessageBuild.O365PostMessageBuild@0
117- displayName : ' Graph Client Tooling pipeline fail notification'
118- inputs :
119- addressType : serviceEndpoint
120- serviceEndpointName : ' microsoftgraph pipeline status'
121- title : ' $(Build.DefinitionName) failure notification'
122- text : ' This pipeline has failed. View the build details for further information. This is a blocking failure.'
123- condition : and(failed(), ne(variables['Build.Reason'], 'Manual'))
124- enabled : true
35+ - template : templates/checkout-and-credscan.yml
36+ - template : templates/install-java.yml
37+ - template : templates/secure-files.yml
38+ - template : templates/build-and-coverage.yml
39+ - template : templates/publish-artefacts.yml
40+ - template : templates/alert-failure.yml
0 commit comments