Skip to content

Commit

Permalink
disable InitializeCIArtifacts until we get a better loop for usage
Browse files Browse the repository at this point in the history
  • Loading branch information
scbedd authored and azure-sdk committed Nov 5, 2024
1 parent 402a961 commit 6c49744
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions eng/common/scripts/Package-Properties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,22 @@ class PackageProps {
}

[void]InitializeCIArtifacts() {
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot ".." ".." "..")

$ciFolderPath = Join-Path -Path $RepoRoot -ChildPath (Join-Path "sdk" $this.ServiceDirectory)
$ciFiles = Get-ChildItem -Path $ciFolderPath -Filter "ci*.yml" -File

if (-not $this.ArtifactDetails) {
foreach ($ciFile in $ciFiles) {
$ciArtifactResult = $this.ParseYmlForArtifact($ciFile.FullName)
if ($ciArtifactResult) {
$this.ArtifactDetails = [Hashtable]$ciArtifactResult.ArtifactConfig
$this.CIMatrixConfigs = $ciArtifactResult.MatrixConfigs
# if this package appeared in this ci file, then we should
# treat this CI file as the source of the Matrix for this package
break
if ($env:TF_BUILD -or $env:GITHUB_ACTIONS) {
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot ".." ".." "..")

$ciFolderPath = Join-Path -Path $RepoRoot -ChildPath (Join-Path "sdk" $this.ServiceDirectory)
$ciFiles = Get-ChildItem -Path $ciFolderPath -Filter "ci*.yml" -File

if (-not $this.ArtifactDetails) {
foreach ($ciFile in $ciFiles) {
$ciArtifactResult = $this.ParseYmlForArtifact($ciFile.FullName)
if ($ciArtifactResult) {
$this.ArtifactDetails = [Hashtable]$ciArtifactResult.ArtifactConfig
$this.CIMatrixConfigs = $ciArtifactResult.MatrixConfigs
# if this package appeared in this ci file, then we should
# treat this CI file as the source of the Matrix for this package
break
}
}
}
}
Expand Down

0 comments on commit 6c49744

Please sign in to comment.