Skip to content

Commit fa4945f

Browse files
committed
Update prValidate.yml for Azure Pipelines
1 parent ce298e2 commit fa4945f

File tree

1 file changed

+51
-10
lines changed

1 file changed

+51
-10
lines changed

.azure-pipelines/prValidate.yml

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,58 @@
33
# Add steps that build, run tests, deploy, and more:
44
# https://aka.ms/yaml
55

6-
trigger:
7-
- master
86

9-
pool:
10-
vmImage: 'ubuntu-latest'
7+
pr:
8+
branches:
9+
include:
10+
-master
11+
-main
12+
-dev
13+
paths:
14+
exclude:
15+
- .azure-pipelines
16+
- .gradle/wrapper
17+
- .gitignore
18+
- CONTRIBUTING.md
19+
- LICENSE
20+
- THIRD PARTY NOTICES
21+
- gradle.properties
22+
- gradlew
23+
- gradlew.bat
24+
- readme.md
25+
- settings.gradle
26+
27+
trigger: none # disable triggers based on commits.
28+
29+
variables:
30+
PACKAGE_NAME: 'microsoft.graph.core'
31+
PROJECT_PATH: '.\src\Microsoft.Graph.Core\Microsoft.Graph.Core.csproj'
32+
33+
pool:
34+
vmImage: windows-latest
1135

1236
steps:
13-
- script: echo Hello, world!
14-
displayName: 'Run a one-line script'
37+
- checkout: self
38+
clean: true
39+
fetchDepth: 1
40+
41+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
42+
displayName: 'Run CredScan'
43+
inputs:
44+
debugMode: false
45+
46+
- task: PowerShell@2
47+
condition: $(Build.SourceBranchName) != dev
48+
inputs:
49+
filePath: '$(System.DefaultWorkingDirectory)/Scripts/validateMavenVersion.ps1'
50+
pwsh: true
51+
1552

16-
- script: |
17-
echo Add other tasks to build, test, and deploy your project.
18-
echo See https://aka.ms/yaml
19-
displayName: 'Run a multi-line script'
53+
- task: Gradle@2
54+
inputs:
55+
gradleWrapperFile: 'gradlew'
56+
tasks: 'build'
57+
publishJUnitResults: true
58+
testResultsFiles: '**/TEST-*.xml'
59+
javaHomeOption: 'JDKVersion'
60+
sonarQubeRunAnalysis: false

0 commit comments

Comments
 (0)