Skip to content

Commit 6be1d1f

Browse files
authored
Use new templates to enable internal sources and runtimes (#9205)
These use WIF to get dSAS tokens for internal runtimes, as well as using NuGetAuthenticate to authenticate to internal feeds.
1 parent 1cbd567 commit 6be1d1f

File tree

2 files changed

+6
-20
lines changed

2 files changed

+6
-20
lines changed

eng/pipeline-pr.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ jobs:
8888
- name: _InternalRuntimeDownloadArgs
8989
value: ''
9090
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
91-
- group: DotNetBuilds storage account read tokens
9291
- group: AzureDevOps-Artifact-Feeds-Pats
9392
- name: _InternalRuntimeDownloadArgs
9493
value: >-
@@ -158,15 +157,8 @@ jobs:
158157
- powershell: eng\pre-build.ps1
159158
displayName: Pre-Build - Set VSO Variables
160159

161-
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
162-
- task: PowerShell@2
163-
displayName: Setup Private Feeds Credentials
164-
inputs:
165-
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
166-
arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
167-
env:
168-
Token: $(dn-bot-dnceng-artifact-feeds-rw)
169-
- task: NuGetAuthenticate@1
160+
- template: /eng/common/templates/steps/enable-internal-sources.yml
161+
- template: /eng/common/templates/steps/enable-internal-runtimes.yml
170162

171163
# Use utility script to run script command dependent on agent OS.
172164
- script: eng\scripts\cibuild.cmd

eng/pipeline.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ jobs:
7979
- name: _InternalRuntimeDownloadArgs
8080
value: ''
8181
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
82-
- group: DotNetBuilds storage account read tokens
8382
- group: AzureDevOps-Artifact-Feeds-Pats
8483
- name: _InternalRuntimeDownloadArgs
8584
value: >-
@@ -139,15 +138,10 @@ jobs:
139138
clean: true
140139
- powershell: eng\pre-build.ps1
141140
displayName: Pre-Build - Set VSO Variables
142-
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
143-
- task: PowerShell@2
144-
displayName: Setup Private Feeds Credentials
145-
inputs:
146-
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
147-
arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
148-
env:
149-
Token: $(dn-bot-dnceng-artifact-feeds-rw)
150-
- task: NuGetAuthenticate@1
141+
142+
- template: /eng/common/templates-official/steps/enable-internal-sources.yml
143+
- template: /eng/common/templates-official/steps/enable-internal-runtimes.yml
144+
151145
# Use utility script to run script command dependent on agent OS
152146
- script: eng\scripts\cibuild.cmd -configuration $(_BuildConfig) -prepareMachine $(_PublishArgs) $(_SignArgs) $(_OfficialBuildIdArgs) $(_PlatformArgs) $(_InternalRuntimeDownloadArgs)
153147
displayName: Windows Build / Publish

0 commit comments

Comments
 (0)