PipelineSummary
namespace Aspire.Hosting.Pipelines;
public sealed class PipelineSummary{ // ...}Remarks
Section titled RemarksThis class provides a flexible way for any pipeline step to contribute information to be displayed after pipeline execution. The data is stored as key-value pairs that will be formatted as a table or list in the CLI output.
Pipeline steps can add any relevant information such as resource group names, subscription IDs, URLs, namespaces, cluster names, or any other details. Values can be plain text or Markdown-formatted by using MarkdownString.
The summary is available via the PipelineContext.Summary property and can be accessed from any pipeline step.
Constructors1
Section titled ConstructorsProperties1
Section titled PropertiesItemsgetReadOnlyCollection<PipelineSummaryItem>Methods2
Section titled MethodsAdd(string, MarkdownString)ats ignoredExamples
Section titled Examples// In a pipeline step, add to the summarypublic async Task ExecuteAsync(PipelineStepContext context){ // Do work...
// Add plain text summary items context.PipelineContext.Summary.Add("☁️ Target", "Azure"); context.PipelineContext.Summary.Add("📦 Resource Group", "rg-myapp"); context.PipelineContext.Summary.Add("🔑 Subscription", "12345678-1234-1234-1234-123456789012"); context.PipelineContext.Summary.Add("🌐 Location", "eastus");}
// Kubernetes example context.PipelineContext.Summary.Add("☸️ Target", "Kubernetes"); context.PipelineContext.Summary.Add("📦 Namespace", "production"); context.PipelineContext.Summary.Add("🖥️ Cluster", "my-cluster");
// Docker example context.PipelineContext.Summary.Add("🐳 Target", "Docker"); context.PipelineContext.Summary.Add("🌐 Endpoint", "localhost:8080");
// Add a Markdown-formatted value (e.g., a clickable link) context.PipelineContext.Summary.Add("📦 Resource Group", new MarkdownString($"[{rgName}]({portalUrl})"));