From 8b6c0ded38700b2cc220131ab81677d81530054f Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 12 Jul 2024 09:25:29 -0700 Subject: [PATCH] Enable internal runtime downloads via dSAS (#34217) --- azure-pipelines.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index eb8849500db..7a3615fa6df 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,7 +18,6 @@ variables: - name: PostBuildSign value: true - group: DotNet-HelixApi-Access - - group: DotNetBuilds storage account read tokens - group: AzureDevOps-Artifact-Feeds-Pats - name: _InternalRuntimeDownloadArgs value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) @@ -117,6 +116,7 @@ extends: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - script: eng\common\cibuild.cmd -configuration $(_BuildConfig) -prepareMachine $(_InternalBuildArgs) $(_InternalRuntimeDownloadArgs) $(_AdditionalBuildArgs) env: Test__Cosmos__DefaultConnection: $(_CosmosConnectionUrl) @@ -144,6 +144,7 @@ extends: arguments: $(Build.SourcesDirectory)/NuGet.config $Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - script: eng/common/cibuild.sh --configuration $(_BuildConfig) --prepareMachine $(_InternalRuntimeDownloadArgs) env: Test__Cosmos__DefaultConnection: $(_CosmosConnectionUrl) @@ -185,6 +186,7 @@ extends: arguments: $(Build.SourcesDirectory)/NuGet.config $Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml - script: eng/common/cibuild.sh --configuration $(_BuildConfig) --prepareMachine $(_InternalRuntimeDownloadArgs) displayName: Build templateContext: @@ -224,6 +226,16 @@ extends: arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token env: Token: $(dn-bot-dnceng-artifact-feeds-rw) + - template: /eng/common/templates-official/steps/enable-internal-runtimes.yml + - template: /eng/common/templates-official/steps/get-delegation-sas.yml + parameters: + federatedServiceConnection: 'dotnetbuilds-internal-read' + outputVariableName: 'dotnetbuilds-internal-container-read-token' + expiryInHours: 1 + base64Encode: false + storageAccount: dotnetbuilds + container: internal + permissions: rl - script: restore.cmd -ci /p:configuration=$(_BuildConfig) $(_InternalRuntimeDownloadArgs) displayName: Restore packages - script: .dotnet\dotnet build eng\helix.proj /restore /t:Test /p:configuration=$(_BuildConfig) /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog $(_InternalRuntimeDownloadArgs)