aspire do command
Name
aspire do - Execute a specific pipeline step and its dependencies.
Synopsis
aspire do [options] [[--] ...]
Description
The aspire do command executes a specific pipeline step and its dependencies in your Aspire AppHost. This command provides fine-grained control over the orchestration pipeline, allowing you to run individual steps of the deployment or build process.
The command allows you to:
- Execute specific pipeline steps without running the entire pipeline
- Run only the dependencies needed for a particular step
- Test individual pipeline stages during development
- Customize pipeline execution with environment-specific settings
- Discover available steps and their dependencies using the diagnostics step
Arguments
The following arguments are available:
stepThe name of the step to execute.
Options
The following options are available:
--Delimits arguments to
aspire dofrom arguments for the AppHost. All arguments after this delimiter are passed to the application being run.-
-o, --output-path
The optional output path for artifacts.
--log-levelSet the minimum log level for pipeline logging. Valid values are:
trace,debug,information,warning,error,critical. The default isinformation.-e, --environmentThe environment to use for the operation. The default is
Production.--include-exception-detailsInclude exception details (stack traces) in pipeline logs.
-
-
-
-
-
Discovering available steps
-
-
-
-
Before executing a pipeline step, you can discover what steps are available in your application's pipeline and understand their dependencies using the diagnostics step.
Understanding pipeline structure
The aspire do diagnostics command provides comprehensive information about your pipeline, including:
- All available steps and their dependencies
- Execution order with parallelization indicators
- Step dependencies and target resources
- Configuration issues like orphaned steps or circular dependencies
This is particularly useful after installing a deployment package or when you want to understand which steps will execute for a given command.
Well-known steps
Aspire provides several well-known steps that serve as entry points for common operations:
build: Builds container images for compute resources defined in the applicationpush: Pushes container images to registries after they have been builtpublish: Generates deployment artifacts by serializing resources to diskdeploy: Orchestrates the complete deployment process including infrastructure provisioning, image building, and application deployment
Resources in your application can contribute their own custom steps, and you can add application-specific steps through the pipeline API.
Examples
The following examples demonstrate common pipeline operations:
Examine the pipeline structure and available steps:
aspire do diagnosticsThis displays all steps in your pipeline, their dependencies, and execution order. Use this to understand what steps are available and how they relate to each other.
Build container images for your application:
aspire do buildThis builds all container images for compute resources defined in your AppHost.
Push container images to a registry:
aspire do pushThis pushes built container images to their configured registries. The push step automatically includes its dependencies (building images and ensuring registry availability) before pushing.
Execute a pipeline step with debug logging:
aspire do deploy --log-level debugUse debug logging to get detailed troubleshooting output during step execution.
Execute a pipeline step for a specific environment:
aspire do publish --environment StagingTarget different environments to use environment-specific configurations.
Execute a pipeline step with custom output path:
aspire do publish --output-path ./artifactsSpecify where publishing artifacts should be written.
Execute a pipeline step with additional arguments:
aspire do test -- --configuration ReleasePass additional arguments to the AppHost after the
--delimiter.