File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -48,13 +48,20 @@ function New-BuildInfoJson {
4848 Write-Verbose - Message " $vstsCommandString " - Verbose
4949 Write-Host - Object " ##$vstsCommandString "
5050
51+ # Upload for ADO pipelines
52+ Write-Host " ##vso[artifact.upload containerfolder=BuildInfoJson;artifactname=BuildInfoJson]$resolvedPath "
53+
54+ # Copy to location where OneBranch Pipelines uploads from
55+
56+ # if the environment variable does not exist, we are not in OneBranch. So just return.
57+ if (-not $env: ob_outputDirectory ) {
58+ return
59+ }
60+
5161 if (-not (Test-Path $env: ob_outputDirectory )) {
5262 $null = New-Item - Path $env: ob_outputDirectory - ItemType Directory - Force - Verbose
5363 }
5464
55- # Upload for ADO pipelines
56- Write-Host " ##vso[artifact.upload containerfolder=BuildInfoJson;artifactname=BuildInfoJson]$resolvedPath "
57- # Copy to location where OneBranch Pipelines uploads from
5865 Copy-Item $resolvedPath - Destination $env: ob_outputDirectory - Force - Verbose
5966}
6067
You can’t perform that action at this time.
0 commit comments