Skip to content

Commit b4b76ef

Browse files
committed
Quick fix: Move SetupNugetSources script invocations above parameters.beforeBuild
- ensure NuGet.config is ready for all internal builds - remove now-duplicate `SetupNugetSources` invocations wherever default-build.yml is used
1 parent 134d3df commit b4b76ef

File tree

3 files changed

+19
-60
lines changed

3 files changed

+19
-60
lines changed

.azure/pipelines/ci.yml

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ variables:
4848
- group: DotNet-MSRC-Storage
4949
- name: _InternalRuntimeDownloadArgs
5050
value: -DotNetRuntimeSourceFeed https://dotnetclimsrc.blob.core.windows.net/dotnet -DotNetRuntimeSourceFeedKey $(dotnetclimsrc-read-sas-token-base64) /p:DotNetAssetRootAccessTokenSuffix='$(dotnetclimsrc-read-sas-token-base64)'
51-
# The code signing doesn't use the aspnet build scripts, so the msbuild parameers have
51+
# The code signing doesn't use the aspnet build scripts, so the msbuild parameters have
5252
# to be passed directly. This is awkward, since we pass the same info above, but we have
5353
# to have it in two different forms
5454
- name: _InternalRuntimeDownloadCodeSignArgs
@@ -100,14 +100,6 @@ stages:
100100
jobDisplayName: Code check
101101
agentOs: Windows
102102
steps:
103-
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
104-
- task: PowerShell@2
105-
displayName: Setup Private Feeds Credentials
106-
inputs:
107-
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
108-
arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
109-
env:
110-
Token: $(dn-bot-dnceng-artifact-feeds-rw)
111103
- powershell: ./eng/scripts/CodeCheck.ps1 -ci $(_InternalRuntimeDownloadArgs)
112104
displayName: Run eng/scripts/CodeCheck.ps1
113105
artifacts:
@@ -135,15 +127,6 @@ stages:
135127
# This is intentional to workaround https://github.com/dotnet/arcade/issues/1957 which always re-submits for code-signing, even
136128
# if they have already been signed. This results in slower builds due to re-submitting the same .nupkg many times for signing.
137129
# The sign settings have been configured to
138-
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
139-
- task: PowerShell@2
140-
displayName: Setup Private Feeds Credentials
141-
inputs:
142-
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
143-
arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
144-
env:
145-
Token: $(dn-bot-dnceng-artifact-feeds-rw)
146-
147130
- script: ./build.cmd
148131
-ci
149132
-arch x64
@@ -325,14 +308,6 @@ stages:
325308
agentOs: Linux
326309
useHostedUbuntu: false
327310
steps:
328-
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
329-
- task: Bash@3
330-
displayName: Setup Private Feeds Credentials
331-
inputs:
332-
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
333-
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
334-
env:
335-
Token: $(dn-bot-dnceng-artifact-feeds-rw)
336311
- script: ./build.sh
337312
--ci
338313
--arch x64
@@ -564,14 +539,6 @@ stages:
564539
agentOs: Windows
565540
isTestingJob: true
566541
steps:
567-
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
568-
- task: PowerShell@2
569-
displayName: Setup Private Feeds Credentials
570-
inputs:
571-
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
572-
arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
573-
env:
574-
Token: $(dn-bot-dnceng-artifact-feeds-rw)
575542
- script: ./build.cmd -ci -all -pack $(_InternalRuntimeDownloadArgs)
576543
displayName: Build Repo
577544
- script: ./src/ProjectTemplates/build.cmd -ci -pack -NoRestore -NoBuilddeps "/p:RunTemplateTests=true /bl:artifacts/log/template.pack.binlog"
@@ -701,7 +668,6 @@ stages:
701668
# Build the shared framework
702669
- script: ./build.cmd -ci -all -pack -arch x64 -buildNative /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.daily.build.x64.binlog
703670
displayName: Build shared fx
704-
# Build the x86 shared framework
705671
- script: .\restore.cmd -ci /p:BuildInteropProjects=true
706672
displayName: Restore
707673
- script: .\build.cmd -ci -NoRestore -test -projects eng\helix\helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildAllProjects=true /p:BuildInteropProjects=true /p:BuildNative=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl

.azure/pipelines/jobs/codesign-xplat.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@ jobs:
2828
contents: '**/*.nupkg'
2929
targetFolder: $(Build.SourcesDirectory)/artifacts/packages/$(BuildConfiguration)/shipping/
3030
flattenFolders: true
31-
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
32-
- task: PowerShell@2
33-
displayName: Setup Private Feeds Credentials
34-
inputs:
35-
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
36-
arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
37-
env:
38-
Token: $(dn-bot-dnceng-artifact-feeds-rw)
3931
- powershell: .\eng\common\build.ps1
4032
-ci
4133
-restore

.azure/pipelines/jobs/default-build.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -171,27 +171,28 @@ jobs:
171171

172172
- ${{ parameters.beforeBuild }}
173173

174-
- ${{ if ne(parameters.steps, '')}}:
175-
- ${{ parameters.steps }}
176-
- ${{ if eq(parameters.steps, '')}}:
177-
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
178-
- ${{ if eq(parameters.agentOs, 'Windows') }}:
179-
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
180-
- task: PowerShell@2
181-
displayName: Setup Private Feeds Credentials
182-
inputs:
183-
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
184-
arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
185-
env:
186-
Token: $(dn-bot-dnceng-artifact-feeds-rw)
187-
- ${{ if ne(parameters.agentOs, 'Windows') }}:
188-
- task: Bash@3
174+
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
175+
- ${{ if eq(parameters.agentOs, 'Windows') }}:
176+
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
177+
- task: PowerShell@2
189178
displayName: Setup Private Feeds Credentials
190179
inputs:
191-
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
192-
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
180+
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
181+
arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
193182
env:
194183
Token: $(dn-bot-dnceng-artifact-feeds-rw)
184+
- ${{ if ne(parameters.agentOs, 'Windows') }}:
185+
- task: Bash@3
186+
displayName: Setup Private Feeds Credentials
187+
inputs:
188+
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
189+
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
190+
env:
191+
Token: $(dn-bot-dnceng-artifact-feeds-rw)
192+
193+
- ${{ if ne(parameters.steps, '')}}:
194+
- ${{ parameters.steps }}
195+
- ${{ if eq(parameters.steps, '')}}:
195196
- ${{ if eq(parameters.buildScript, '') }}:
196197
- ${{ if eq(parameters.agentOs, 'Windows') }}:
197198
- script: .\$(BuildDirectory)\build.cmd -ci /p:DotNetSignType=$(_SignType) -Configuration $(BuildConfiguration) $(BuildScriptArgs)

0 commit comments

Comments
 (0)