Skip to content

Commit

Permalink
Remove tokens for GitHub and AzDO when using darc get-asset in the …
Browse files Browse the repository at this point in the history
…tagging stage. This eliminates need for a restricted variable group.
  • Loading branch information
garath committed Feb 7, 2024
1 parent 83a52e3 commit a2dc021
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 0 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,11 @@ stages:
demands: ImageOverride -equals windows.vs2022.amd64
variables:
- group: Publish-Build-Assets
- group: DotNetBot-GitHub
steps:
- checkout: self
clean: true
- powershell: eng/create-baridtag.ps1
-azdoToken $(dn-bot-dotnet-build-rw-code-rw)
-barToken $(MaestroAccessToken)
-githubPAT $(BotAccount-dotnet-bot-repo-PAT)
displayName: Create BAR ID Tag
name: Create_BAR_ID_Tag
- template: eng\common\templates\post-build\post-build.yml
Expand Down
4 changes: 1 addition & 3 deletions eng/create-baridtag.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
Param(
[Parameter(Mandatory=$true)][string] $azdoToken,
[Parameter(Mandatory=$true)][string] $barToken,
[Parameter(Mandatory=$true)][string] $githubPAT,
[string] $sourceChannelName = '.NET Eng - Validation'
)

Expand All @@ -13,7 +11,7 @@ $darc = & "$PSScriptRoot\validation\get-darc.ps1"

$arcadeSdkPackageName = 'Microsoft.DotNet.Arcade.Sdk'
$arcadeSdkVersion = $GlobalJson.'msbuild-sdks'.$arcadeSdkPackageName
$assetData = & $darc get-asset --name $arcadeSdkPackageName --version $arcadeSdkVersion --channel "$sourceChannelName" --github-pat $githubPAT --azdev-pat $azdoToken --password $bartoken --output-format json | convertFrom-Json
$assetData = & $darc get-asset --name $arcadeSdkPackageName --version $arcadeSdkVersion --channel "$sourceChannelName" --password $bartoken --output-format json | convertFrom-Json

# Get the BAR Build ID for the version of Arcade we are validating
$barBuildId = $assetData.build.id
Expand Down

0 comments on commit a2dc021

Please sign in to comment.