Skip to content

Commit a7e8e7f

Browse files
authored
Update sync-aliases CI to fix issue caused by PowerShell upgrade (#23486)
1 parent a433d62 commit a7e8e7f

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

.azure-pipelines/sync-aliases.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,24 @@ jobs:
1313

1414
steps:
1515
- task: UseDotNet@2
16-
displayName: Install .NET 7 SDK
16+
displayName: Install .NET 8 SDK
1717
inputs:
1818
packageType: sdk
19-
version: 7.0.x
19+
version: 8.0.x
2020
- template: util/get-github-pat-steps.yml
2121

2222
- pwsh: |
2323
dotnet --version
2424
dotnet new tool-manifest --force
25-
dotnet tool install powershell
26-
displayName: Install Latest PowerShell (7.3+)
25+
dotnet tool install powershell --version 7.4.*
26+
displayName: Install PowerShell 7.4.x
2727
28-
- task: AzurePowerShell@5
29-
inputs:
30-
azureSubscription: 'Azure SDK Infrastructure'
31-
ScriptType: 'InlineScript'
32-
Inline: |
33-
$ADOTokenValue = Get-AzKeyVaultSecret -VaultName ${env:KEYVAULTNAME} -Name ${env:ADOTOKENNAME} -AsPlainText
34-
Write-Host "##vso[task.setvariable variable=ADOToken;issecret=true]$ADOTokenValue"
35-
azurePowerShellVersion: 'LatestVersion'
36-
displayName: Get ADOToken from Key Vault
28+
- template: util/get-keyvault-secret-steps.yml
29+
parameters:
30+
serviceConnectionName: $(AzureSubscription)
31+
keyVaultName: $(KeyVaultName)
32+
secretName: $(ADOTokenName)
33+
outVar: 'ADOToken'
3734

3835
- pwsh: |
3936
dotnet tool run pwsh -NoLogo -NoProfile -NonInteractive -File "./tools/Github/ParseServiceContactsList.ps1 -ADOToken $(ADOToken)"

0 commit comments

Comments
 (0)