Skip to content

Commit d8b0cc6

Browse files
kotlarmilosCopilot
andcommitted
Publish Helix work item logs to artifacts/log/<BuildConfig>/helix-results
Adds a step after Send-to-Helix that copies artifacts/helix-results into artifacts/log/$(BuildConfig)/helix-results so per-work-item output.log files are uploaded with the pipeline artifacts. Helix work items that fail inside the queue currently leave only a portal-auth-protected console URL in the AzDO log; copying the downloaded result files into the published artifacts surface them to anyone with build access. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c877a5f commit d8b0cc6

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

eng/pipelines/templates/run-performance-job.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,37 @@ jobs:
245245
parameters:
246246
osGroup: ${{ parameters.osGroup }}
247247
projectFile: $(_projectFile)
248+
- ${{ if eq(parameters.osGroup, 'windows') }}:
249+
- task: PowerShell@2
250+
displayName: Copy Helix work item logs to artifacts/log
251+
inputs:
252+
targetType: inline
253+
script: |
254+
$src = "$(System.DefaultWorkingDirectory)/artifacts/helix-results"
255+
$dst = "$(System.DefaultWorkingDirectory)/artifacts/log/$(BuildConfig)/helix-results"
256+
if (Test-Path $src) {
257+
New-Item -ItemType Directory -Force -Path $dst | Out-Null
258+
Copy-Item -Path "$src/*" -Destination $dst -Recurse -Force -ErrorAction SilentlyContinue
259+
Write-Host "Copied $src -> $dst"
260+
} else {
261+
Write-Host "No helix-results directory present at $src"
262+
}
263+
continueOnError: true
264+
condition: always()
265+
- ${{ if ne(parameters.osGroup, 'windows') }}:
266+
- script: |
267+
src="$(System.DefaultWorkingDirectory)/artifacts/helix-results"
268+
dst="$(System.DefaultWorkingDirectory)/artifacts/log/$(BuildConfig)/helix-results"
269+
if [ -d "$src" ]; then
270+
mkdir -p "$dst"
271+
cp -R "$src"/. "$dst"/ 2>/dev/null || true
272+
echo "Copied $src -> $dst"
273+
else
274+
echo "No helix-results directory present at $src"
275+
fi
276+
displayName: Copy Helix work item logs to artifacts/log
277+
continueOnError: true
278+
condition: always()
248279
- ${{ if eq(parameters.osGroup, 'windows') }}:
249280
- task: PowerShell@2
250281
displayName: Redact Logs

0 commit comments

Comments
 (0)