Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync eng/common directory with azure-sdk-tools for PR 9328 #31635

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ steps:
-ArtifactPath '${{ parameters.DiffDirectory }}'
pwsh: true

# 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.
# Instead, we will save the changed services to a file, attach it as an attachment for PiplineWitness to pick up and utilize.
- pwsh: |
$changedServices = (Get-Content -Path '${{ parameters.DiffDirectory }}/diff.json' -Raw | ConvertFrom-Json).ChangedServices

if ($changedServices) {
Write-Host "Attaching changed service names to the build for additional tag generation."
$changedServices | ConvertTo-Json | Out-File -FilePath $(System.DefaultWorkingDirectory)/tags.json -Encoding utf8
Write-Host '##vso[task.addattachment type=AdditionalTags;name=AdditionalTags;]$(System.DefaultWorkingDirectory)/tags.json'
}
displayName: Upload tags.json with changed services

- task: Powershell@2
displayName: Save package properties filtered for PR
inputs:
Expand Down
Loading