Sync eng/common directory with azure-sdk-tools for PR 9732 (#6383)

* update emitter template

* hide step if public pr

* update conditions after testing

---------

Co-authored-by: m-nash <64171366+m-nash@users.noreply.github.com>
This commit is contained in:
Azure SDK Bot 2025-01-29 15:23:35 -08:00 committed by GitHub
parent 15e98d2991
commit 82b119785b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -447,3 +447,14 @@ extends:
parameters:
artifactName: test_artifacts_$(System.JobName)
artifactPath: $(Build.ArtifactStagingDirectory)
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- task: AzureCLI@2
displayName: "Upload Spector Standard Coverage Report"
condition: and(ne(variables['SpectorName'], ''), succeeded())
inputs:
azureSubscription: "TypeSpec Storage"
scriptType: "bash"
scriptLocation: "inlineScript"
inlineScript: npx tsp-spector upload-coverage --coverageFile $(Build.ArtifactStagingDirectory)/tsp-spector-coverage-azure.json --generatorName @azure-typespec/$(SpectorName) --storageAccountName typespec --containerName coverages --generatorVersion $(node -p -e "require('./package.json').version") --generatorMode azure
workingDirectory: $(Build.SourcesDirectory)/eng/packages/$(SpectorName)