Skip to content

Commit 0cc9b35

Browse files
Apply editorial suggestions from alistairmatthews review
Co-authored-by: alistairmatthews <41286777+alistairmatthews@users.noreply.github.com>
1 parent dbdc9e8 commit 0cc9b35

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

src/frontend/src/content/docs/get-started/pipelines.mdx

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,10 @@ aspire do diagnostics
414414
```
415415

416416
This command displays:
417-
- All available steps and their dependencies
418-
- Execution order with parallelization indicators
419-
- Step dependencies and target resources
420-
- Configuration issues like orphaned steps or circular dependencies
417+
- All available steps and their dependencies.
418+
- Execution order with parallelization indicators.
419+
- Step dependencies and target resources.
420+
- Configuration issues like orphaned steps or circular dependencies.
421421

422422
The output includes several sections:
423423

@@ -503,10 +503,10 @@ dependsOn: ["provision-database"],
503503
requiredBy: ["deploy-apiservice"]);
504504
```
505505

506-
**Dependency types:**
506+
You can choose from two dependency types to fix the step order:
507507

508-
- **`dependsOn`**: This step runs after the specified steps complete
509-
- **`requiredBy`**: This step must complete before the specified steps run
508+
- **`dependsOn`**: This step runs after the specified steps complete.
509+
- **`requiredBy`**: This step must complete before the specified steps run.
510510

511511
### Pipeline configuration
512512

@@ -518,9 +518,11 @@ The `WithPipelineConfiguration` API is experimental and may change in future rel
518518

519519
## Common use cases
520520

521+
To deepen your understanding of pipelines, let's examine scenarios where you might use them.
522+
521523
### Multi-environment deployments
522524

523-
Create environment-specific pipeline steps:
525+
If you're deploying to testing, staging, production, or other environments, you might want to take different deployment actions in each case. You can use the pipeline context to create environment-specific pipeline steps:
524526

525527
```csharp title="C# — Multi-environment deployment"
526528
var builder = DistributedApplication.CreateBuilder(args);
@@ -546,7 +548,7 @@ dependsOn: [WellKnownPipelineSteps.Deploy]);
546548
builder.Build().Run();
547549
```
548550

549-
Deploy to different environments:
551+
You can deploy to different environments, and trigger the above environment-specific steps, by using the `--environment` option:
550552

551553
```bash title="Aspire CLI — Deploy to specific environment"
552554
# Deploy to staging
@@ -584,7 +586,7 @@ builder.Build().Run();
584586

585587
### Database migrations
586588

587-
Integrate database migrations into the deployment pipeline:
589+
If you want to ensure a database is populated as part of your deployment, you can create a step that integrates database migrations into the deployment pipeline:
588590

589591
```csharp title="C# — Database migrations step"
590592
var builder = DistributedApplication.CreateBuilder(args);
@@ -633,17 +635,21 @@ The old publishing callback system has been removed and replaced with pipeline s
633635

634636
### Migration steps
635637

638+
Follow these steps to replace your Aspire 9.x publishing code with Aspire 13.x pipelines:
639+
636640
<Steps>
637641

638-
1. **Identify publishing callbacks** in your code that use `WithPublishingCallback`
639-
2. **Convert to pipeline steps** using `WithPipelineStepFactory` or `builder.Pipeline.AddStep`
640-
3. **Update dependencies**: when using `builder.Pipeline.AddStep`, configure dependencies via the `dependsOn` / `requiredBy` parameters; when creating `PipelineStep` instances directly, use the `DependsOn` and `RequiredBySteps` properties
641-
4. **Test the migration** using `aspire do diagnostics` and `aspire do deploy`
642+
1. **Identify publishing callbacks** in your code that use `WithPublishingCallback`.
643+
2. **Convert callbacks to pipeline steps** using `WithPipelineStepFactory` or `builder.Pipeline.AddStep`.
644+
3. **Update dependencies** with parameters or properties. When using `builder.Pipeline.AddStep`, configure dependencies with the `dependsOn` / `requiredBy` parameters. When creating `PipelineStep` instances directly, use the `DependsOn` and `RequiredBySteps` properties.
645+
4. **Test the migration** using `aspire do diagnostics` and `aspire do deploy`.
642646

643647
</Steps>
644648

645649
### Before and after examples
646650

651+
Here are some code examples that show Aspire 9.x code and the Aspire 13.x equivalent.
652+
647653
#### Resource-level callback
648654

649655
**Before (Aspire 9.x):**
@@ -760,12 +766,12 @@ builder.Pipeline.AddStep("smoke-tests", async (context) =>
760766

761767
The pipeline system provides several advantages over publishing callbacks:
762768

763-
- **Better visibility**: Use `aspire do diagnostics` to see all steps and their dependencies
764-
- **Selective execution**: Run specific steps with `aspire do <step-name>`
765-
- **Parallel execution**: Independent steps run concurrently automatically
766-
- **Clearer dependencies**: Explicit dependency declaration with `DependsOn` and `RequiredBySteps`
767-
- **Better error handling**: Failed steps don't block unrelated operations
768-
- **Reusability**: Steps can be reused across different deployment scenarios
769+
- **Better visibility**: Use `aspire do diagnostics` to see all steps and their dependencies.
770+
- **Selective execution**: Run specific steps with `aspire do <step-name>`.
771+
- **Parallel execution**: Independent steps run concurrently automatically.
772+
- **Clearer dependencies**: Explicit dependency declaration with `DependsOn` and `RequiredBySteps`.
773+
- **Better error handling**: Failed steps don't block unrelated operations.
774+
- **Reusability**: Steps can be reused across different deployment scenarios.
769775

770776
<Aside type="tip">
771777
After migrating, use `aspire do diagnostics` to verify that your pipeline steps are correctly configured and that dependencies are properly declared.

0 commit comments

Comments
 (0)