Sync eng/common directory with azure-sdk-tools for PR 7445 (#5247)
* Add package filter parameter to select recursively found packages in release * Handle empty value for packageFilter --------- Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
parent
23ecf87ecb
commit
08c5187e36
@ -1,6 +1,7 @@
|
||||
parameters:
|
||||
ArtifactLocation: 'not-specified'
|
||||
PackageRepository: 'not-specified'
|
||||
PackageFilter: ''
|
||||
ReleaseSha: 'not-specified'
|
||||
RepoId: $(Build.Repository.Name)
|
||||
WorkingDirectory: ''
|
||||
@ -14,10 +15,11 @@ steps:
|
||||
arguments: >
|
||||
-artifactLocation ${{ parameters.ArtifactLocation }}
|
||||
-packageRepository ${{ parameters.PackageRepository }}
|
||||
-packageFilter "${{ parameters.PackageFilter }}"
|
||||
-releaseSha ${{ parameters.ReleaseSha }}
|
||||
-repoId ${{ parameters.RepoId }}
|
||||
-workingDirectory '${{ parameters.WorkingDirectory }}'
|
||||
pwsh: true
|
||||
timeoutInMinutes: 5
|
||||
env:
|
||||
GH_TOKEN: $(azuresdk-github-pat)
|
||||
GH_TOKEN: $(azuresdk-github-pat)
|
||||
|
||||
@ -7,6 +7,7 @@ param (
|
||||
$artifactLocation, # the root of the artifact folder. DevOps $(System.ArtifactsDirectory)
|
||||
$workingDirectory, # directory that package artifacts will be extracted into for examination (if necessary)
|
||||
$packageRepository, # used to indicate destination against which we will check the existing version.
|
||||
$packageFilter,
|
||||
# valid options: PyPI, Nuget, NPM, Maven, C, CPP
|
||||
# used by CreateTags
|
||||
$releaseSha, # the SHA for the artifacts. DevOps: $(Release.Artifacts.<artifactAlias>.SourceVersion) or $(Build.SourceVersion)
|
||||
@ -26,6 +27,11 @@ Write-Host "Using API URL $apiUrl"
|
||||
# VERIFY PACKAGES
|
||||
$pkgList = VerifyPackages -artifactLocation $artifactLocation -workingDirectory $workingDirectory -apiUrl $apiUrl -releaseSha $releaseSha -continueOnError $continueOnError
|
||||
|
||||
if ($packageFilter) {
|
||||
Write-Host "Filtering discovered packages to '$packageFilter'"
|
||||
[array]$pkgList = $pkgList | Where-Object { $_.PackageId -like $packageFilter }
|
||||
}
|
||||
|
||||
if ($pkgList) {
|
||||
Write-Host "Given the visible artifacts, github releases will be created for the following:"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user