Skip to content

Commit c813e9a

Browse files
authored
SFI ES2.6 Migrate from service accounts to Managed Identities (#15559) (#15576)
1 parent b8ed716 commit c813e9a

3 files changed

Lines changed: 17 additions & 14 deletions

File tree

.ado/publish.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,6 @@ variables:
140140
value: false
141141
- name: EnableCodesign
142142
value: false
143-
- name: ArtifactServices.Symbol.AccountName
144-
value: microsoft
145-
- name: ArtifactServices.Symbol.PAT
146-
value: $(pat-symbols-publish-microsoft)
147143
- name: SourceBranchWithFolders
148144
value: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
149145

@@ -451,6 +447,8 @@ extends:
451447
# Make symbols available through http://symweb.
452448
- task: PublishSymbols@2
453449
displayName: Publish symbols
450+
env:
451+
ARTIFACTSERVICES_SYMBOL_ACCOUNTNAME: microsoft
454452
inputs:
455453
SearchPattern: vnext/target/**/*.pdb
456454
SymbolServerType: TeamServices

.ado/release.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,11 @@ extends:
4343
- checkout: none
4444
- task: NuGetToolInstaller@1
4545
displayName: 'Use NuGet '
46-
- task: NuGetAuthenticate@1
47-
displayName: NuGet Authenticate
48-
inputs:
49-
nuGetServiceConnections: ms/react-native ADO Feed
46+
- template: .ado/templates/authenticate-office-react-native-windows-bot.yml@self
5047
- task: CmdLine@2
5148
displayName: NuGet push (react-native)
5249
inputs:
53-
script: nuget.exe push *.nupkg -ApiKey AzureArtifacts -Source https://pkgs.dev.azure.com/ms/_packaging/react-native/nuget/v3/index.json -NonInteractive -Verbosity Detailed -SkipDuplicate -NoSymbols
50+
script: nuget.exe push *.nupkg -ApiKey $(oficeReactnativeWindowsBotAadAuthToken) -Source https://pkgs.dev.azure.com/ms/_packaging/react-native/nuget/v3/index.json -NonInteractive -Verbosity Detailed -SkipDuplicate -NoSymbols
5451
workingDirectory: $(Pipeline.Workspace)/ReactWindows-final-nuget
5552
- stage: PushToPublicAdoStage
5653
displayName: ADO - react-native-public
@@ -69,14 +66,11 @@ extends:
6966
- checkout: none
7067
- task: NuGetToolInstaller@1
7168
displayName: 'Use NuGet '
72-
- task: NuGetAuthenticate@1
73-
displayName: NuGet Authenticate
74-
inputs:
75-
nuGetServiceConnections: ms/react-native-public ADO Feed
69+
- template: .ado/templates/authenticate-office-react-native-windows-bot.yml@self
7670
- task: CmdLine@2
7771
displayName: NuGet push (react-native-public)
7872
inputs:
79-
script: nuget.exe push *.nupkg -ApiKey AzureArtifacts -Source https://pkgs.dev.azure.com/ms/react-native/_packaging/react-native-public/nuget/v3/index.json -NonInteractive -Verbosity Detailed -SkipDuplicate -NoSymbols
73+
script: nuget.exe push *.nupkg -ApiKey $(oficeReactnativeWindowsBotAadAuthToken) -Source https://pkgs.dev.azure.com/ms/react-native/_packaging/react-native-public/nuget/v3/index.json -NonInteractive -Verbosity Detailed -SkipDuplicate -NoSymbols
8074
workingDirectory: $(Pipeline.Workspace)/ReactWindows-final-nuget
8175
- stage: PushToNuGetStage
8276
displayName: nuget.org - Push nuget packages
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
steps:
2+
- task: AzureCLI@2
3+
inputs:
4+
azureSubscription: 'Office-React-Native-Windows-Bot'
5+
scriptType: 'bash'
6+
scriptLocation: 'inlineScript'
7+
inlineScript: |
8+
# Note that the resource is specified to limit the token to Azure DevOps
9+
aadToken=$(az account get-access-token --query accessToken --resource 499b84ac-1321-427f-aa17-267ca6975798 -o tsv)
10+
echo "##vso[task.setvariable variable=oficeReactnativeWindowsBotAadAuthToken;issecret=true]$aadToken"
11+
displayName: 'Generate oficeReactnativeWindowsBotAadAuthToken AAD token using Azure CLI'

0 commit comments

Comments
 (0)