Skip to content
Merged
Show file tree
Hide file tree
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
48 changes: 28 additions & 20 deletions eng/common/pipelines/templates/steps/get-pr-owners.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
parameters:
TargetVariable: ''
TargetUserVariable: 'notspecified'
TargetTeamVariable: 'notspecified'
TargetLabelVariable: 'notspecified'
ServiceDirectory: ''
DevOpsFeed: "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json"

steps:
- pwsh: |
git clone https://github.com/Azure/azure-sdk-tools.git $(Build.SourcesDirectory)/tools_repo
cd $(Build.SourcesDirectory)/tools_repo
git checkout azure-sdk-tools_20210114.1
displayName: Setup Identity Resolver
- task: DotNetCoreCLI@2
displayName: 'Install Identity Resolver'
inputs:
command: custom
custom: 'tool'
arguments: 'install --global --add-source "${{ parameters.DevOpsFeed }}" --version "1.0.0-dev.20211018.1" "Azure.Sdk.Tools.IdentityResolver"'
workingDirectory: '$(Agent.BuildDirectory)'

- task: DotNetCoreCLI@2
displayName: 'Install CodeOwners Retriever'
inputs:
command: custom
custom: 'tool'
arguments: 'install --global --add-source "${{ parameters.DevOpsFeed }}" --version "1.0.0-dev.20211019.1" "Azure.Sdk.Tools.RetrieveCodeOwners"'
workingDirectory: '$(Agent.BuildDirectory)'

- pwsh: |
dotnet run -v q -- `
identity-resolver `
--aad-app-id-var APP_ID `
--aad-app-secret-var APP_SECRET `
--aad-tenant-var AAD_TENANT `
Expand All @@ -19,10 +33,9 @@ steps:
--kusto-table-var KUSTO_TABLE `
--identity-name "$(Build.QueuedBy)" `
--identity-email "$(Build.RequestedForEmail)" `
--targetvar "${{ parameters.TargetVariable }}"
--targetvar "${{ coalesce(parameters.TargetVariable, parameters.TargetUserVariable) }}"
displayName: 'Resolving Queuing User'
continueOnError: true
workingDirectory: $(Build.SourcesDirectory)/tools_repo/tools/notification-configuration/identity-resolver
env:
APP_ID: $(notification-aad-app-id)
APP_SECRET: $(notification-aad-secret)
Expand All @@ -32,15 +45,10 @@ steps:
KUSTO_TABLE: $(notification-kusto-table)

- pwsh: |
Remove-Item -Force -Recurse $(Build.SourcesDirectory)/tools_repo
displayName: Clean Up Cloned Tools Repo

- task: PowerShell@2
displayName: Add CodeOwners if Present
inputs:
pwsh: true
filePath: $(Build.SourcesDirectory)/eng/common/scripts/get-codeowners.ps1
arguments: >
-TargetDirectory "/sdk/${{ parameters.ServiceDirectory }}/"
-RootDirectory "$(Build.SourcesDirectory)"
-VsoVariable "${{ parameters.TargetVariable }}"
retrieve-codeowners `
--target-directory "/sdk/${{ parameters.ServiceDirectory }}/" `
--root-directory "$(Build.SourcesDirectory)" `
--vso-owning-users "${{ coalesce(parameters.TargetVariable, parameters.TargetUserVariable) }}" `
--vso-owning-teams "${{ parameters.TargetTeamVariable }}" `
--vso-owning-labels "${{ parameters.TargetLabelVariable }}"
displayName: 'Add CodeOwners if Present'
50 changes: 0 additions & 50 deletions eng/common/scripts/get-codeowners.ps1

This file was deleted.