WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 02ccde8

Browse files
committed
Merged PR 47050: Use WIF connection for release management
#### AI description (iteration 1) #### PR Classification Code cleanup and configuration update. #### PR Summary This pull request updates the release management process to use WIF (Workload Identity Federation) connection. - Modified `prepare-release.yml` to remove SAS token generation steps and update Azure subscription. - Updated `AcquireBuild.ps1` to remove SAS suffixes parameter and use Azure credentials for blob access.
1 parent 1622140 commit 02ccde8

File tree

2 files changed

+4
-29
lines changed

2 files changed

+4
-29
lines changed

eng/pipelines/prepare-release.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,40 +30,17 @@ stages:
3030
installationPath: '$(Build.Repository.LocalPath)\.dotnet'
3131
- template: /eng/common/templates/post-build/setup-maestro-vars.yml
3232

33-
# Populate dotnetbuilds-internal-container-read-token
34-
- template: /eng/common/templates-official/steps/get-delegation-sas.yml
35-
parameters:
36-
federatedServiceConnection: 'dotnetbuilds-internal-read'
37-
outputVariableName: 'dotnetbuilds-internal-checksums-container-read-token'
38-
expiryInHours: 1
39-
base64Encode: false
40-
storageAccount: dotnetbuilds
41-
container: internal-checksums
42-
permissions: rl
43-
44-
# Populate dotnetbuilds-internal-container-read-token
45-
- template: /eng/common/templates-official/steps/get-delegation-sas.yml
46-
parameters:
47-
federatedServiceConnection: 'dotnetbuilds-internal-read'
48-
outputVariableName: 'dotnetbuilds-internal-container-read-token'
49-
expiryInHours: 1
50-
base64Encode: false
51-
storageAccount: dotnetbuilds
52-
container: internal
53-
permissions: rl
54-
5533
- task: AzureCLI@2
5634
displayName: 'DARC Gather build'
5735
inputs:
58-
azureSubscription: "Darc: Maestro Production"
36+
azureSubscription: 'DotNetStaging'
5937
scriptType: ps
6038
scriptPath: '$(Build.Repository.LocalPath)/eng/release/Scripts/AcquireBuild.ps1'
6139
arguments: >-
6240
-BarBuildId "$(BARBuildId)"
6341
-ReleaseVersion "$(Build.BuildNumber)"
6442
-DownloadTargetPath "$(System.ArtifactsDirectory)\ReleaseTarget"
6543
-AzdoToken "$(dn-bot-all-drop-rw-code-rw-release-all)"
66-
-SasSuffixes "$(dotnetbuilds-internal-checksums-container-read-token),$(dotnetbuilds-internal-container-read-token)"
6744
workingDirectory: '$(Build.Repository.LocalPath)'
6845
- task: AzureCLI@2
6946
displayName: 'Manifest generation and asset publishing'

eng/release/Scripts/AcquireBuild.ps1

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ param(
22
[Parameter(Mandatory=$true)][int] $BarBuildId,
33
[Parameter(Mandatory=$true)][string] $ReleaseVersion,
44
[Parameter(Mandatory=$true)][string] $DownloadTargetPath,
5-
[Parameter(Mandatory=$true)][string] $SasSuffixes,
65
[Parameter(Mandatory=$true)][string] $AzdoToken,
76
[Parameter(Mandatory=$false)][string] $DarcVersion = $null,
87
[switch] $help,
@@ -13,7 +12,6 @@ function Write-Help() {
1312
Write-Host " -BarBuildId <value> BAR Build ID of the diagnostics build to publish."
1413
Write-Host " -ReleaseVersion <value> Name to give the diagnostics release."
1514
Write-Host " -DownloadTargetPath <value> Path to download the build to."
16-
Write-Host " -SasSuffixes <value> Comma separated list of potential uri suffixes that can be used if anonymous access to a blob uri fails. Appended directly to the end of the URI. Use full SAS syntax with ?."
1715
Write-Host " -AzdoToken <value> Azure DevOps token to use for builds queries"
1816
Write-Host ""
1917
}
@@ -48,11 +46,11 @@ try {
4846
--release-name $ReleaseVersion `
4947
--output-dir $DownloadTargetPath `
5048
--overwrite `
51-
--sas-suffixes $SasSuffixes `
49+
--use-azure-credential-for-blobs `
5250
--azdev-pat $AzdoToken `
5351
--separated `
54-
--ci `
55-
--verbose
52+
--continue-on-error `
53+
--ci
5654

5755
if ($LastExitCode -ne 0) {
5856
Write-Host "Error: unable to gather the assets from build $BarBuildId to $DownloadTargetPath using darc."

0 commit comments

Comments
 (0)