Skip to content

Commit 27aa26e

Browse files
committed
[release/3.1] Don't run Code Check in official builds
1 parent 8a4133b commit 27aa26e

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

.azure/pipelines/ci.yml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -89,27 +89,28 @@ stages:
8989
displayName: Build
9090
jobs:
9191
# 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
113114

114115
# Build Windows (x64/x86)
115116
- template: jobs/default-build.yml

0 commit comments

Comments
 (0)