Use job execution context instead of step for adding summary attachments (#1667)

* use job exec context to queue/attach summaries

* step summary tests: use job ctx and verify against server queue
This commit is contained in:
Rob Herley
2022-02-08 13:22:36 -05:00
committed by GitHub
parent 9240a1cf6c
commit bac91075f4
2 changed files with 62 additions and 13 deletions

View File

@@ -317,7 +317,8 @@ namespace GitHub.Runner.Worker
var attachmentName = context.Id.ToString();
Trace.Info($"Queueing file ({filePath}) for attachment upload ({attachmentName})");
context.QueueAttachFile(ChecksAttachmentType.StepSummary, attachmentName, scrubbedFilePath);
// Attachments must be added to the parent context (job), not the current context (step)
context.Root.QueueAttachFile(ChecksAttachmentType.StepSummary, attachmentName, scrubbedFilePath);
}
catch (Exception e)
{