@@ -89,27 +89,28 @@ stages:
89
89
displayName : Build
90
90
jobs :
91
91
# Code check
92
- - template : jobs/default-build.yml
93
- parameters :
94
- jobName : Code_check
95
- jobDisplayName : Code check
96
- agentOs : Windows
97
- steps :
98
- - ${{ if ne(variables['System.TeamProject'], 'public') }} :
99
- - task : PowerShell@2
100
- displayName : Setup Private Feeds Credentials
101
- inputs :
102
- filePath : $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
103
- arguments : -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
104
- env :
105
- Token : $(dn-bot-dnceng-artifact-feeds-rw)
106
- - powershell : ./eng/scripts/CodeCheck.ps1 -ci $(_InternalRuntimeDownloadArgs)
107
- displayName : Run eng/scripts/CodeCheck.ps1
108
- artifacts :
109
- - name : Code_Check_Logs
110
- path : artifacts/log/
111
- publishOnError : true
112
- includeForks : true
92
+ - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }} :
93
+ - template : jobs/default-build.yml
94
+ parameters :
95
+ jobName : Code_check
96
+ jobDisplayName : Code check
97
+ agentOs : Windows
98
+ steps :
99
+ - ${{ if ne(variables['System.TeamProject'], 'public') }} :
100
+ - task : PowerShell@2
101
+ displayName : Setup Private Feeds Credentials
102
+ inputs :
103
+ filePath : $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
104
+ arguments : -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
105
+ env :
106
+ Token : $(dn-bot-dnceng-artifact-feeds-rw)
107
+ - powershell : ./eng/scripts/CodeCheck.ps1 -ci $(_InternalRuntimeDownloadArgs)
108
+ displayName : Run eng/scripts/CodeCheck.ps1
109
+ artifacts :
110
+ - name : Code_Check_Logs
111
+ path : artifacts/log/
112
+ publishOnError : true
113
+ includeForks : true
113
114
114
115
# Build Windows (x64/x86)
115
116
- template : jobs/default-build.yml
0 commit comments