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