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

Sync eng/common directory with azure-sdk-tools for PR 7445 #22233

Merged
merged 2 commits into from
Jan 11, 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
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
parameters:
ArtifactLocation: 'not-specified'
PackageRepository: 'not-specified'
PackageFilter: ''
ReleaseSha: 'not-specified'
RepoId: $(Build.Repository.Name)
WorkingDirectory: ''
Expand All @@ -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)
6 changes: 6 additions & 0 deletions eng/common/scripts/create-tags-and-git-release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:"

Expand Down