6
6
- pwsh : |
7
7
git clone https://github.com/Azure/azure-sdk-tools.git $(Build.SourcesDirectory)/tools_repo
8
8
cd $(Build.SourcesDirectory)/tools_repo
9
- git checkout 564ad63ae72d18422533fa1da9d396e7703c1cb5
9
+ git checkout 35ad98f821913eb0e8872f861ee60589b563c865
10
10
displayName: Setup Identity Resolver
11
11
12
12
- pwsh : |
13
- $result = dotnet run -v q -- `
13
+ dotnet run -v q -- `
14
14
--aad-app-id-var APP_ID `
15
15
--aad-app-secret-var APP_SECRET `
16
16
--aad-tenant-var AAD_TENANT `
17
17
--kusto-url-var KUSTO_URL `
18
18
--kusto-database-var KUSTO_DB `
19
19
--kusto-table-var KUSTO_TABLE `
20
- --identity "$(Build.QueuedBy)"
21
-
22
- $resolvedIdentity = ""
23
- try { $resolvedIdentity = $result[-1] | ConvertFrom-Json } catch {}
24
-
25
- if($resolvedIdentity) {
26
- Write-Host $resolvedIdentity
27
-
28
- Write-Host "##vso[task.setvariable variable=${{ parameters.TargetVariable }}]$($resolvedIdentity.GithubUserName)"
29
- }
30
- else {
31
- Write-Host "Unable to locate a github user for identity $(Build.QueuedBy)"
32
- }
20
+ --identity "$(Build.QueuedBy)" `
21
+ --targetvar "${{ parameters.TargetVariable }}"
33
22
displayName: 'Resolving Queuing User'
34
23
continueOnError: true
35
24
workingDirectory: $(Build.SourcesDirectory)/tools_repo/tools/notification-configuration/identity-resolver
@@ -45,10 +34,12 @@ steps:
45
34
Remove-Item -Force -Recurse $(Build.SourcesDirectory)/tools_repo
46
35
displayName: Clean Up Cloned Tools Repo
47
36
48
- - pwsh : |
49
- $originalValue = "$(${{ parameters.TargetVariable }})"
50
- $result = $(Build.SourcesDirectory)/eng/common/scripts/get-codeowners.ps1 -TargetDirectory /sdk/${{ parameters.ServiceDirectory }}/ -RootDirectory $(Build.SourcesDirectory)
51
- if ($result) {
52
- Write-Host "##vso[task.setvariable variable=${{ parameters.TargetVariable }}]$originalValue,$result"
53
- }
54
- displayName: Add CodeOwners if Present
37
+ - task : PowerShell@2
38
+ displayName : Add CodeOwners if Present
39
+ inputs :
40
+ pwsh : true
41
+ filePath : $(Build.SourcesDirectory)/eng/common/scripts/get-codeowners.ps1
42
+ arguments : >
43
+ -TargetDirectory "/sdk/${{ parameters.ServiceDirectory }}/"
44
+ -RootDirectory "$(Build.SourcesDirectory)"
45
+ -VsoVariable "${{ parameters.TargetVariable }}"
0 commit comments