-
Notifications
You must be signed in to change notification settings - Fork 110
Add PowerShell scripting support in Aspire AppHost #706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
...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