Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
just handle any ci.blah.yml
  • Loading branch information
scbedd authored and azure-sdk committed Oct 10, 2024
commit 3ee7d4c3311533ef281ffd9d5e65f6dc74b2e073
22 changes: 10 additions & 12 deletions eng/common/scripts/Package-Properties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,19 @@ class PackageProps

[void]InitializeCIArtifacts(){
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot ".." ".." "..")
$ciFilePath = Join-Path -Path $RepoRoot -ChildPath (Join-Path "sdk" $this.ServiceDirectory "ci.yml")
$ciMgmtYmlFilePath = Join-Path -Path $RepoRoot -ChildPath (Join-Path "sdk" $this.ServiceDirectory "ci.mgmt.yml")
# $ciFilePath = Join-Path -Path $RepoRoot -ChildPath (Join-Path "sdk" $this.ServiceDirectory "ci.yml")
# $ciMgmtYmlFilePath = Join-Path -Path $RepoRoot -ChildPath (Join-Path "sdk" $this.ServiceDirectory "ci.mgmt.yml")

if (-not $this.ArtifactDetails) {
$ciArtifactResult = $this.ParseYmlForArtifact($ciFilePath)
if ($ciArtifactResult) {
$this.ArtifactDetails = [Hashtable]$ciArtifactResult
}
}
$ciFolderPath = Join-Path -Path $RepoRoot -ChildPath (Join-Path "sdk" $this.ServiceDirectory)
$ciFiles = Get-ChildItem -Path $ciFolderPath -Filter "ci*.yml" -File

if (-not $this.ArtifactDetails) {
$ciMgmtResult = $this.ParseYmlForArtifact($ciMgmtYmlFilePath)

if ($ciMgmtResult) {
$this.ArtifactDetails = [Hashtable]$ciMgmtResult
foreach($ciFile in $ciFiles) {
$ciArtifactResult = $this.ParseYmlForArtifact($ciFile.FullName)
if ($ciArtifactResult) {
$this.ArtifactDetails = [Hashtable]$ciArtifactResult
break
}
}
}
}
Expand Down