use working directory in eng\common\pipelines\templates\steps\save-package-properties.yml (#6545)

Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
This commit is contained in:
Azure SDK Bot 2025-04-28 19:45:39 -07:00 committed by GitHub
parent cece8a16c0
commit 394e24680f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,6 +11,9 @@ parameters:
- name: TargetPath
type: string
default: $(Build.SourcesDirectory)
- name: WorkingDirectory
type: string
default: $(Build.SourcesDirectory)
- name: ScriptDirectory
type: string
default: eng/common/scripts
@ -36,6 +39,7 @@ steps:
-ArtifactPath '${{ parameters.DiffDirectory }}'
-ExcludePaths ('${{ convertToJson(parameters.ExcludePaths) }}' | ConvertFrom-Json)
pwsh: true
WorkingDirectory: '${{ parameters.WorkingDirectory }}'
# When running in PR mode, we want the detected changed services to be attached to the build as tags.
# However, the public identity does not have the permissions to attach tags to the build.
@ -49,6 +53,7 @@ steps:
Write-Host '##vso[task.addattachment type=AdditionalTags;name=AdditionalTags;]$(System.DefaultWorkingDirectory)/tags.json'
}
displayName: Upload tags.json with changed services
WorkingDirectory: '${{ parameters.WorkingDirectory }}'
- task: Powershell@2
displayName: Save package properties filtered for PR
@ -58,6 +63,7 @@ steps:
-PrDiff '${{ parameters.DiffDirectory }}/diff.json'
-OutDirectory '${{ parameters.PackageInfoDirectory }}'
pwsh: true
WorkingDirectory: '${{ parameters.WorkingDirectory }}'
- ${{ else }}:
- task: Powershell@2
displayName: Save package properties
@ -68,3 +74,4 @@ steps:
-OutDirectory '${{ parameters.PackageInfoDirectory }}'
-AddDevVersion:($env:SETDEVVERSION -eq 'true')
pwsh: true
WorkingDirectory: '${{ parameters.WorkingDirectory }}'