From d92ec2f57685daa3ccb5aadc8bb9b8e49dc74929 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Mon, 17 Nov 2025 08:06:50 -0800 Subject: [PATCH 1/2] Update custom deployment validation setup code sample Update sample to use actual APIs. --- .../content/docs/get-started/pipelines.mdx | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/frontend/src/content/docs/get-started/pipelines.mdx b/src/frontend/src/content/docs/get-started/pipelines.mdx index 84d272bc..a0febe82 100644 --- a/src/frontend/src/content/docs/get-started/pipelines.mdx +++ b/src/frontend/src/content/docs/get-started/pipelines.mdx @@ -253,20 +253,16 @@ Applications can add custom steps directly through the pipeline API for scenario ```csharp title="C# — AppHost.cs" var builder = DistributedApplication.CreateBuilder(args); +// Add custom deployment validation +builder.Pipeline.AddStep("validate-deployment", async context => + // Custom validation logic + await ValidateApiHealth(context); + await ValidateDatabaseConnection(context); +}, requiredBy: WellKnownPipelineSteps.Deploy); + // Define resources var database = builder.AddPostgres("myapp-db"); var api = builder.AddProject("api").WithReference(database); - -// Add custom deployment validation -builder.Services.Configure(options => -{ - options.AddStep("validate-deployment", async context => - { - // Custom validation logic - await ValidateApiHealth(context); - await ValidateDatabaseConnection(context); - }).DependsOn(WellKnownSteps.Deploy); -}); ``` This pattern enables applications to extend the deployment process with custom logic while benefiting from the pipeline's dependency management and execution coordination. @@ -348,4 +344,4 @@ The pipeline system provides robust failure handling during parallel execution: 4. **Error isolation**: Failures in one part of the pipeline are contained and don't affect independent operations -The system maintains comprehensive logging and state information to support efficient debugging and recovery, ensuring that developers can quickly identify and resolve issues while preserving all successful work. \ No newline at end of file +The system maintains comprehensive logging and state information to support efficient debugging and recovery, ensuring that developers can quickly identify and resolve issues while preserving all successful work. From ee5964600a2c74775c848a6d59e01f99eaca7864 Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Mon, 17 Nov 2025 11:55:23 -0800 Subject: [PATCH 2/2] Update src/frontend/src/content/docs/get-started/pipelines.mdx Co-authored-by: David Pine --- src/frontend/src/content/docs/get-started/pipelines.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/content/docs/get-started/pipelines.mdx b/src/frontend/src/content/docs/get-started/pipelines.mdx index a0febe82..158b47d2 100644 --- a/src/frontend/src/content/docs/get-started/pipelines.mdx +++ b/src/frontend/src/content/docs/get-started/pipelines.mdx @@ -255,9 +255,10 @@ var builder = DistributedApplication.CreateBuilder(args); // Add custom deployment validation builder.Pipeline.AddStep("validate-deployment", async context => - // Custom validation logic - await ValidateApiHealth(context); - await ValidateDatabaseConnection(context); +{ + // Custom validation logic + await ValidateApiHealth(context); + await ValidateDatabaseConnection(context); }, requiredBy: WellKnownPipelineSteps.Deploy); // Define resources