Add PowerShell scripting support in Aspire AppHost#706
Add PowerShell scripting support in Aspire AppHost#706aaronpowell merged 29 commits intoCommunityToolkit:mainfrom
Conversation
aaronpowell
left a comment
There was a problem hiding this comment.
Looks like a good start, there's some code changes I've got in there.
Can you also look at the unit tests as well as the integration tests, to match the test design of other integrations.
Also, it doesn't appear that the projects are in the slnx so they'll need to be added to ensure they are built.
Lastly, the PowerShell expects the Azure CLI to be installed, maybe we should have simpler scripts without those dependencies, otherwise the devcontainer + CI will need to be updated to ensure that the Azure CLI is installed.
examples/powershell/CommunityToolkit.Aspire.PowerShell.AppHost/Program.cs
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.PowerShell/DistributedApplicationBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.PowerShell/DistributedApplicationBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.PowerShell/DistributedApplicationBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.PowerShell/DistributedApplicationBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.PowerShell/PowerShellScriptResource.cs
Show resolved
Hide resolved
...ommunityToolkit.Aspire.Hosting.PowerShell/PowerShellRunspacePoolResourceBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
...ommunityToolkit.Aspire.Hosting.PowerShell/PowerShellRunspacePoolResourceBuilderExtensions.cs
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.PowerShell/PowerShellScriptResource.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.PowerShell/PowerShellScriptResource.cs
Show resolved
Hide resolved
…icationBuilderExtensions.cs Co-authored-by: Aaron Powell <me@aaron-powell.com>
…acePoolResourceBuilderExtensions.cs Co-authored-by: Aaron Powell <me@aaron-powell.com>
…icationBuilderExtensions.cs Co-authored-by: Aaron Powell <me@aaron-powell.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds PowerShell scripting support to the Aspire AppHost by introducing new PowerShell resource types, runspace pool management, and corresponding integration tests and documentation.
- Adds a new PowerShell scripting project and supporting resource builders/extensions.
- Introduces integration tests to validate script execution and host functionality.
- Updates solution and project files to integrate with the existing Aspire framework.
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/CommunityToolkit.Aspire.Hosting.PowerShell.Tests/* | New tests for PowerShell resource execution. |
| src/CommunityToolkit.Aspire.Hosting.PowerShell/* | New implementation of PowerShell scripting and runspace pool resources. |
| examples/powershell/* | Example app host demonstrating usage of the new PowerShell scripting support. |
| Directory.Packages.props | Updated package references to support PowerShell SDK. |
src/CommunityToolkit.Aspire.Hosting.PowerShell/PowerShellScriptResource.cs
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.PowerShell/PowerShellScriptResource.cs
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.PowerShell/PowerShellScriptResource.cs
Show resolved
Hide resolved
…tResource.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
src/CommunityToolkit.Aspire.Hosting.PowerShell/DistributedApplicationBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.PowerShell/DistributedApplicationBuilderExtensions.cs
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.PowerShell/DistributedApplicationBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.PowerShell/DistributedApplicationBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.PowerShell/PowerShellScriptResource.cs
Show resolved
Hide resolved
…icationBuilderExtensions.cs Co-authored-by: Aaron Powell <me@aaron-powell.com>
…acePoolResourceBuilderExtensions.cs Co-authored-by: Aaron Powell <me@aaron-powell.com>
…icationBuilderExtensions.cs Co-authored-by: Aaron Powell <me@aaron-powell.com>
…tResource.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
src/CommunityToolkit.Aspire.Hosting.PowerShell/PowerShellScriptResource.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.PowerShell/PowerShellScriptResource.cs
Outdated
Show resolved
Hide resolved
...CommunityToolkit.Aspire.Hosting.PowerShell/CommunityToolkit.Aspire.Hosting.PowerShell.csproj
Outdated
Show resolved
Hide resolved
…t.Aspire.Hosting.PowerShell.csproj
Closes #707
PR Checklist
Other information