Skip to content

Commit e6324dc

Browse files
authored
Make coverage report upload conditional on project name (#3205)
1 parent e07e879 commit e6324dc

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

eng/pipelines/build.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,16 @@ stages:
130130
workingDirectory: $(Build.SourcesDirectory)/autorest.csharp
131131
- publish: $(Build.SourcesDirectory)/autorest.csharp/artifacts/coverage/cadl-ranch-coverage-csharp.json
132132
artifact: CoverageReport
133-
- task: AzureCLI@2
134-
displayName: 'Upload to Cadl Ranch Coverage Report'
135-
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))
136-
inputs:
137-
azureSubscription: "Cadl Ranch Storage"
138-
scriptType: "bash"
139-
scriptLocation: "inlineScript"
140-
inlineScript: npx cadl-ranch upload-coverage --coverageFile ./artifacts/coverage/cadl-ranch-coverage-csharp.json --generatorName csharp --storageAccountName azuresdkcadlranch --generatorVersion $(node -p -e "require('./src/CADL.Extension/Emitter.Csharp/package.json').version")
141-
workingDirectory: $(Build.SourcesDirectory)/autorest.csharp
133+
- ${{if eq(variables['System.TeamProject'], 'internal')}}:
134+
- task: AzureCLI@2
135+
displayName: 'Upload to Cadl Ranch Coverage Report'
136+
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))
137+
inputs:
138+
azureSubscription: "Cadl Ranch Storage"
139+
scriptType: "bash"
140+
scriptLocation: "inlineScript"
141+
inlineScript: npx cadl-ranch upload-coverage --coverageFile ./artifacts/coverage/cadl-ranch-coverage-csharp.json --generatorName csharp --storageAccountName azuresdkcadlranch --generatorVersion $(node -p -e "require('./src/CADL.Extension/Emitter.Csharp/package.json').version")
142+
workingDirectory: $(Build.SourcesDirectory)/autorest.csharp
142143
- template: check-code-generation.yml
143144
parameters:
144145
name: Check_Code_Generation_A_C

0 commit comments

Comments
 (0)