Skip to content
Merged
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
13 changes: 13 additions & 0 deletions eng/pipelines/templates/stages/archetype-python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,19 @@ stages:
- ${{if ne(artifact.skipPublishDevFeed, 'true')}}:

- pwsh: |
# If BuildTargetingString is set, check whether this artifact matches any of the
# (possibly comma-separated) glob patterns before attempting to publish.
# This handles scoped builds where only a subset of packages are built.
$targetingString = $env:BUILDTARGETINGSTRING
if ($targetingString) {
$globs = $targetingString -split ","
$isTargeted = $globs | Where-Object { "${{artifact.name}}" -like $_.Trim() }
Comment thread
scbedd marked this conversation as resolved.
if (-not $isTargeted) {
Write-Host "Package '${{artifact.name}}' does not match BuildTargetingString '$targetingString'. Skipping integration publish."
exit 0
}
}

$fileCount = (Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}} | ? {$_.Name -match "-[0-9]*.[0-9]*.[0-9]*a[0-9]*" } | Measure-Object).Count

if ($fileCount -eq 0) {
Comment thread
scbedd marked this conversation as resolved.
Expand Down
Loading