Make sure we do not upload artifacts during a pull request (#7535)
This commit is contained in:
parent
4acf1038a1
commit
0a1a47e8b0
|
@ -1331,7 +1331,11 @@ function Publish-TestResults
|
|||
{
|
||||
$resolvedPath = (Resolve-Path -Path $Path).ProviderPath
|
||||
Write-Host "##vso[results.publish type=$Type;mergeResults=true;runTitle=$Title;publishRunAttachments=true;resultFiles=$resolvedPath;]"
|
||||
Write-Host "##vso[artifact.upload containerfolder=testResults;artifactname=testResults]$resolvedPath"
|
||||
|
||||
if($env:BUILD_REASON -ne 'PullRequest')
|
||||
{
|
||||
Write-Host "##vso[artifact.upload containerfolder=testResults;artifactname=testResults]$resolvedPath"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -233,8 +233,11 @@ function Send-VstsLogFile {
|
|||
Copy-Item -Path $Path -Destination $logFile
|
||||
}
|
||||
|
||||
Write-Host "##vso[artifact.upload containerfolder=$name;artifactname=$name]$logFile"
|
||||
Write-Verbose "Log file captured as $name" -Verbose
|
||||
if($env:BUILD_REASON -ne 'PullRequest')
|
||||
{
|
||||
Write-Host "##vso[artifact.upload containerfolder=$name;artifactname=$name]$logFile"
|
||||
Write-Verbose "Log file captured as $name" -Verbose
|
||||
}
|
||||
}
|
||||
|
||||
# Tests if the Linux or macOS user is root
|
||||
|
|
Loading…
Reference in a new issue