Filter the TestPackage artifact upload by name to avoid other zip files being uploaded (#8116)

This commit is contained in:
Aditya Patwardhan 2018-10-29 14:13:05 -07:00 committed by GitHub
parent b1e2745b53
commit d7c7fa504f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View file

@ -78,7 +78,7 @@ phases:
# Uploads any packages as an artifact
- powershell: |
Get-ChildItem -Path *.rpm, *.deb, *.tar.gz, *.zip -Recurse | Select-Object -ExpandProperty FullName | ForEach-Object {
Get-ChildItem -Path *.rpm, *.deb, *.tar.gz, TestPackage.zip -Recurse | Select-Object -ExpandProperty FullName | ForEach-Object {
Write-Host "##vso[artifact.upload containerfolder=artifacts;artifactname=artifacts]$_"
}
displayName: Publish Artifacts

View file

@ -53,7 +53,7 @@ phases:
# Uploads any packages as an artifact
- powershell: |
Get-ChildItem -Path *.pkg, *.tar.gz, *.zip -Recurse | Select-Object -ExpandProperty FullName | ForEach-Object {
Get-ChildItem -Path *.pkg, *.tar.gz, TestPackage.zip -Recurse | Select-Object -ExpandProperty FullName | ForEach-Object {
Write-Host "##vso[artifact.upload containerfolder=artifacts;artifactname=artifacts]$_"
}
displayName: Publish Artifacts

View file

@ -3003,9 +3003,12 @@ function New-TestPackage
$rootFolder = $env:AGENT_WORKFOLDER
}
Write-Verbose -Verbose "RootFolder: $rootFolder"
$packageRoot = Join-Path $rootFolder ('TestPackage-' + (new-guid))
$null = New-Item -ItemType Directory -Path $packageRoot -Force
$packagePath = Join-Path $Destination "TestPackage.zip"
Write-Verbose -Verbose "PackagePath: $packagePath"
# Build test tools so they are placed in appropriate folders under 'test' then copy to package root.
$null = Publish-PSTestTools