You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can choose from two dependency types to fix the step order:
507
507
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.
510
510
511
511
### Pipeline configuration
512
512
@@ -518,9 +518,11 @@ The `WithPipelineConfiguration` API is experimental and may change in future rel
518
518
519
519
## Common use cases
520
520
521
+
To deepen your understanding of pipelines, let's examine scenarios where you might use them.
522
+
521
523
### Multi-environment deployments
522
524
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:
You can deploy to different environments, and trigger the above environment-specific steps, by using the `--environment` option:
550
552
551
553
```bash title="Aspire CLI — Deploy to specific environment"
552
554
# Deploy to staging
@@ -584,7 +586,7 @@ builder.Build().Run();
584
586
585
587
### Database migrations
586
588
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:
@@ -633,17 +635,21 @@ The old publishing callback system has been removed and replaced with pipeline s
633
635
634
636
### Migration steps
635
637
638
+
Follow these steps to replace your Aspire 9.x publishing code with Aspire 13.x pipelines:
639
+
636
640
<Steps>
637
641
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`.
642
646
643
647
</Steps>
644
648
645
649
### Before and after examples
646
650
651
+
Here are some code examples that show Aspire 9.x code and the Aspire 13.x equivalent.
0 commit comments