Sync eng/common directory with azure-sdk-tools for PR 4878 (#4156)

* Pass profile flag

* Fix conditional add of '--profile'

* One more attempt at how to enable profile

* Don't publish everything

* Move profile parameter after iterations

* Pass profile parameter as flag option

* Create profile variable

Co-authored-by: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com>
Co-authored-by: Mike Harder <mharder@microsoft.com>
This commit is contained in:
Azure SDK Bot 2022-12-05 15:47:14 -08:00 committed by GitHub
parent 5737bfeb6a
commit 8ec8cc2ce5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,6 +53,9 @@ parameters:
- name: Iterations
type: number
default: '5'
- name: Profile
type: boolean
default: false
- name: AdditionalArguments
type: string
default: ''
@ -77,6 +80,11 @@ jobs:
MatrixName: 'Windows'
variables:
- ${{ parameters.Variables }}
- name: Profile
${{ if parameters.Profile }}:
value: '--profile'
${{ else }}:
value: ''
pool:
name: $(Pool)
vmImage: $(OSVmImage)
@ -125,6 +133,7 @@ jobs:
--tests "${{ parameters.Tests }}"
--arguments "${{ parameters.Arguments }}"
--iterations ${{ parameters.Iterations }}
$(Profile)
${{ parameters.AdditionalArguments }}
workingDirectory: azure-sdk-tools/tools/perf-automation/Azure.Sdk.Tools.PerfAutomation
env:
@ -162,6 +171,12 @@ jobs:
artifactName: results-${{ parameters.Language }}-$(MatrixName)
condition: always()
- task: PublishPipelineArtifact@1
inputs:
targetPath: $(System.DefaultWorkingDirectory)/${{ parameters.Language }}-profile.zip
artifactName: ${{ parameters.Language }}-profile.zip
condition: ${{ parameters.Profile }}
- template: /eng/common/TestResources/remove-test-resources.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}