1
1
parameters :
2
2
TargetVariable : ' '
3
+ TargetUserVariable : ' notspecified'
4
+ TargetTeamVariable : ' notspecified'
5
+ TargetLabelVariable : ' notspecified'
3
6
ServiceDirectory : ' '
7
+ DevOpsFeed : " https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json"
4
8
5
9
steps :
6
- - pwsh : |
7
- git clone https://github.com/Azure/azure-sdk-tools.git $(Build.SourcesDirectory)/tools_repo
8
- cd $(Build.SourcesDirectory)/tools_repo
9
- git checkout azure-sdk-tools_20210114.1
10
- displayName: Setup Identity Resolver
10
+ - task : DotNetCoreCLI@2
11
+ displayName : ' Install Identity Resolver'
12
+ inputs :
13
+ command : custom
14
+ custom : ' tool'
15
+ arguments : ' install --global --add-source "${{ parameters.DevOpsFeed }}" --version "1.0.0-dev.20211018.1" "Azure.Sdk.Tools.IdentityResolver"'
16
+ workingDirectory : ' $(Agent.BuildDirectory)'
17
+
18
+ - task : DotNetCoreCLI@2
19
+ displayName : ' Install CodeOwners Retriever'
20
+ inputs :
21
+ command : custom
22
+ custom : ' tool'
23
+ arguments : ' install --global --add-source "${{ parameters.DevOpsFeed }}" --version "1.0.0-dev.20211019.1" "Azure.Sdk.Tools.RetrieveCodeOwners"'
24
+ workingDirectory : ' $(Agent.BuildDirectory)'
11
25
12
26
- pwsh : |
13
- dotnet run -v q -- `
27
+ identity-resolver `
14
28
--aad-app-id-var APP_ID `
15
29
--aad-app-secret-var APP_SECRET `
16
30
--aad-tenant-var AAD_TENANT `
@@ -19,10 +33,9 @@ steps:
19
33
--kusto-table-var KUSTO_TABLE `
20
34
--identity-name "$(Build.QueuedBy)" `
21
35
--identity-email "$(Build.RequestedForEmail)" `
22
- --targetvar "${{ parameters.TargetVariable }}"
36
+ --targetvar "${{ coalesce( parameters.TargetVariable, parameters.TargetUserVariable) }}"
23
37
displayName: 'Resolving Queuing User'
24
38
continueOnError: true
25
- workingDirectory: $(Build.SourcesDirectory)/tools_repo/tools/notification-configuration/identity-resolver
26
39
env:
27
40
APP_ID: $(notification-aad-app-id)
28
41
APP_SECRET: $(notification-aad-secret)
@@ -32,15 +45,10 @@ steps:
32
45
KUSTO_TABLE: $(notification-kusto-table)
33
46
34
47
- pwsh : |
35
- Remove-Item -Force -Recurse $(Build.SourcesDirectory)/tools_repo
36
- displayName: Clean Up Cloned Tools Repo
37
-
38
- - task : PowerShell@2
39
- displayName : Add CodeOwners if Present
40
- inputs :
41
- pwsh : true
42
- filePath : $(Build.SourcesDirectory)/eng/common/scripts/get-codeowners.ps1
43
- arguments : >
44
- -TargetDirectory "/sdk/${{ parameters.ServiceDirectory }}/"
45
- -RootDirectory "$(Build.SourcesDirectory)"
46
- -VsoVariable "${{ parameters.TargetVariable }}"
48
+ retrieve-codeowners `
49
+ --target-directory "/sdk/${{ parameters.ServiceDirectory }}/" `
50
+ --root-directory "$(Build.SourcesDirectory)" `
51
+ --vso-owning-users "${{ coalesce(parameters.TargetVariable, parameters.TargetUserVariable) }}" `
52
+ --vso-owning-teams "${{ parameters.TargetTeamVariable }}" `
53
+ --vso-owning-labels "${{ parameters.TargetLabelVariable }}"
54
+ displayName: 'Add CodeOwners if Present'
0 commit comments