Add-ConsoleJobSummary
Adds widgets or objects as Markdown to the CI job summary.
Syntax
Add-ConsoleJobSummary
[-InputObject] <Object>
[<CommonParameters>]#All Parameter SetsDescription
Uses the same semantic Markdown exporter as Export-ConsoleFrame. GitHub appends to GITHUB_STEP_SUMMARY. Azure writes a UTF-8 Markdown file in the job workspace and emits task.uploadsummary; the agent owns its later cleanup. GitLab and ordinary terminals write no files and return the Markdown so a script can save it. GitHub and Azure return no pipeline output.
Examples
Example 1
@([pscustomobject]@{ Check = 'Build'; Result = 'Passed' }) | Add-ConsoleJobSummaryAdd a result table to the job summary
Example 2
$servers = @([pscustomobject]@{ Name = 'web01'; State = 'Pass' })
$servers | New-ConsoleTable | Add-ConsoleJobSummaryAdd an inventory table to the CI summary
Parameters
- -InputObject Object
- Widgets or objects to export as Markdown. Objects use the automatic view; multiple widgets are stacked.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.