Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify source channel for asset validation #4183

Merged
merged 2 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
garath marked this conversation as resolved.
Show resolved Hide resolved
-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
5 changes: 2 additions & 3 deletions eng/create-baridtag.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Param(
[Parameter(Mandatory=$true)][string] $azdoToken,
[Parameter(Mandatory=$true)][string] $barToken,
[Parameter(Mandatory=$true)][string] $githubPAT
[string] $sourceChannelName = '.NET Eng - Validation'
)

set-strictmode -version 2.0
Expand All @@ -12,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 --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
5 changes: 3 additions & 2 deletions eng/validation/build-arcadewithrepo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ Param(
[string] $buildParameters = '',
[switch] $pushBranchToGithub,
[string] $azdoRepoName,
[string] $subscribedBranchName
[string] $subscribedBranchName,
[string] $sourceChannelName = '.NET Eng - Validation'
)

set-strictmode -version 2.0
Expand Down Expand Up @@ -198,7 +199,7 @@ if($null -ne $branchExists)
Git-Command $global:githubRepoName checkout -b $global:targetBranch $sha

## Get the BAR Build ID for the version of Arcade we want to use in update-dependecies
$asset = & $darc get-asset --name $global:arcadeSdkPackageName --version $global:arcadeSdkVersion --github-pat $global:githubPAT --azdev-pat $global:azdoToken --password $global:bartoken
$asset = & $darc get-asset --name $global:arcadeSdkPackageName --version $global:arcadeSdkVersion --channel "$sourceChannelName" --github-pat $global:githubPAT --azdev-pat $global:azdoToken --password $global:bartoken
$barBuildIdString = $asset | Select-String -Pattern 'BAR Build Id:'
$barBuildId = ([regex]"\d+").Match($barBuildIdString).Value

Expand Down
3 changes: 2 additions & 1 deletion eng/validation/test-publishing.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ $ErrorActionPreference = 'Stop'
$darc = & "$PSScriptRoot\get-darc.ps1"

$global:buildId = $buildId
$global:sourceChannel = ".NET Eng - Validation"
$global:targetChannel = "General Testing"
$global:azdoToken = $azdoToken
$global:azdoUser = $azdoUser
Expand Down Expand Up @@ -45,7 +46,7 @@ $global:arcadeSdkPackageName = 'Microsoft.DotNet.Arcade.Sdk'
$global:arcadeSdkVersion = $GlobalJson.'msbuild-sdks'.$global:arcadeSdkPackageName
$global:azdoRepoName = "dotnet-arcade"
$global:azdoRepoUri = "https://unused:$azdoToken@${global:azdoOrg}.visualstudio.com/${global:azdoProject}/_git/${global:azdoRepoName}"
$jsonAsset = & $darc get-asset --name $global:arcadeSdkPackageName --version $global:arcadeSdkVersion --github-pat $global:githubPAT --azdev-pat $global:azdoToken --password $global:bartoken --output-format json | convertFrom-Json
$jsonAsset = & $darc get-asset --name $global:arcadeSdkPackageName --version $global:arcadeSdkVersion --channel "$sourceChannel" --github-pat $global:githubPAT --azdev-pat $global:azdoToken --password $global:bartoken --output-format json | convertFrom-Json
$sha = $jsonAsset.build.commit
$global:targetBranch = "val/arcade-" + $global:arcadeSdkVersion

Expand Down
Loading