Skip to content

Commit ee9c3fc

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

File tree

3 files changed

+21
-16
lines changed

3 files changed

+21
-16
lines changed

.ado/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ variables:
8080
value: false
8181
- name: EnableCodesign
8282
value: false
83-
- name: ArtifactServices.Symbol.AccountName
84-
value: microsoft
85-
- name: ArtifactServices.Symbol.PAT
86-
value: $(pat-symbols-publish-microsoft)
8783
- name: SourceBranchWithFolders
8884
value: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
8985

@@ -346,6 +342,8 @@ extends:
346342
# Make symbols available through http://symweb.
347343
- task: PublishSymbols@2
348344
displayName: Publish symbols
345+
env:
346+
ARTIFACTSERVICES_SYMBOL_ACCOUNTNAME: microsoft
349347
inputs:
350348
SearchPattern: vnext/target/**/*.pdb
351349
SymbolServerType: TeamServices
@@ -436,6 +434,8 @@ extends:
436434
- task: PublishSymbols@2
437435
displayName: 'Publish Symbols to Microsoft Symbol Server'
438436
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
437+
env:
438+
ARTIFACTSERVICES_SYMBOL_ACCOUNTNAME: microsoft
439439
inputs:
440440
SymbolsFolder: '$(System.DefaultWorkingDirectory)\NugetRoot'
441441
SearchPattern: '**/*.pdb'

.ado/release.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extends:
8181
approvers: 'khosany@microsoft.com'
8282

8383
- job: PushPrivateAdo
84-
displayName: ADO - react-native
84+
displayName: ADO - nuget - react-native
8585
timeoutInMinutes: 0
8686
templateContext:
8787
inputs:
@@ -93,18 +93,15 @@ extends:
9393
- checkout: none
9494
- task: NuGetToolInstaller@1
9595
displayName: 'Use NuGet '
96-
- task: NuGetAuthenticate@1
97-
displayName: NuGet Authenticate
98-
inputs:
99-
nuGetServiceConnections: ms/react-native ADO Feed
96+
- template: .ado/templates/authenticate-office-react-native-windows-bot.yml@self
10097
- task: CmdLine@2
10198
displayName: NuGet push (react-native)
10299
inputs:
103-
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
100+
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
104101
workingDirectory: $(Pipeline.Workspace)/ReactWindows-final-nuget
105102

106103
- job: PushPublicAdo
107-
displayName: ADO - react-native-public
104+
displayName: ADO - nuget - react-native-public
108105
timeoutInMinutes: 0
109106
templateContext:
110107
inputs:
@@ -116,14 +113,11 @@ extends:
116113
- checkout: none
117114
- task: NuGetToolInstaller@1
118115
displayName: 'Use NuGet '
119-
- task: NuGetAuthenticate@1
120-
displayName: NuGet Authenticate
121-
inputs:
122-
nuGetServiceConnections: ms/react-native-public ADO Feed
116+
- template: .ado/templates/authenticate-office-react-native-windows-bot.yml@self
123117
- task: CmdLine@2
124118
displayName: NuGet push (react-native-public)
125119
inputs:
126-
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
120+
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
127121
workingDirectory: $(Pipeline.Workspace)/ReactWindows-final-nuget
128122

129123
- job: PushNuGetOrg
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)