File tree Expand file tree Collapse file tree 3 files changed +15
-10
lines changed
pipelines/templates/stages Expand file tree Collapse file tree 3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 199199 " pkcs" ,
200200 " Pkcs" ,
201201 " pscredential" ,
202+ " pscore" ,
202203 " psscriptanalyzer" ,
203204 " PUCHAR" ,
204205 " PVOID" ,
Original file line number Diff line number Diff line change @@ -195,15 +195,24 @@ stages:
195195 OpenAsDraft : ${{ parameters.TestPipeline }}
196196 CloseAfterOpenForTesting : ' ${{ parameters.TestPipeline }}'
197197
198+ - task : AzureCLI@2
199+ displayName : Authenticate to OpenSource API
200+ condition : and(succeeded(), eq(variables['PublishToVcpkg'], 'true'))
201+ inputs :
202+ azureSubscription : opensource-api-connection
203+ scriptType : pscore
204+ scriptLocation : inlineScript
205+ inlineScript : |
206+ $jwt_accessToken = az account get-access-token --resource "api://2789159d-8d8b-4d13-b90b-ca29c1707afd" --query "accessToken" --output tsv
207+ Write-Host "##vso[task.setvariable variable=opensource-api-token;isSecret=true]$jwt_accessToken"
208+
198209 # Workaround: -Fallback uses names from CODEOWNERS who
199210 # should be notified about the release in the event of a
200211 # failure to resolve the appropriate aliases.
201212 - pwsh : |
202213 $notifyUsers = ./eng/scripts/Get-TriggeringUserGitHubAlias.ps1 `
203214 -EmailAddress "$($env:BUILD_REQUESTEDFOREMAIL)" `
204- -ClientId '$(opensource-aad-app-id)' `
205- -ClientSecret '$(opensource-aad-secret)' `
206- -TenantId '$(opensource-aad-tenant-id)' `
215+ -OpenApiToken "$(opensource-api-token)" `
207216 -Fallback '@rickwinter @ahsonkhan @antkmsft @gearama @LarryOsterman'
208217
209218 $prComment = "Adding ${{ artifact.Name }} to release"
Original file line number Diff line number Diff line change 11param (
22 [string ] $EmailAddress = $env: BUILD_REQUESTEDFOREMAIL ,
3- [string ] $ClientId ,
4- [string ] $ClientSecret ,
5- [string ] $TenantId ,
3+ [string ] $OpenApiToken ,
64 [string ] $Fallback
75)
86
97. " $PSScriptRoot /../common/scripts/Helpers/Metadata-Helpers.ps1"
108
11- $allUsers = GetAllGitHubUsers `
12- - TenantId $TenantId `
13- - ClientId $ClientId `
14- - ClientSecret $ClientSecret
9+ $allUsers = GetAllGitHubUsers - Token $OpenApiToken
1510
1611if (! $allUsers ) {
1712 Write-Host " Failed to get all GitHub users"
You can’t perform that action at this time.
0 commit comments