Add CI/CD pipeline deployment guide for Aspire applications#458
Add CI/CD pipeline deployment guide for Aspire applications#458
Conversation
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
IEvangelist
left a comment
There was a problem hiding this comment.
This PR looks good so far, but let's double check it for accuracy by using the .github/skills/doc-tester/SKILL.md skill. Please also consider all new comments and feedback/suggestions. @copilot
| - name: Set up .NET | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: '9.x' |
There was a problem hiding this comment.
| dotnet-version: '9.x' | |
| dotnet-version: '10.x' |
There was a problem hiding this comment.
Updated in b3eb860 — both dotnet-version: '9.x' (GitHub Actions) and version: '9.x' (Azure DevOps) are now 10.x.
| displayName: Set up .NET | ||
| inputs: | ||
| packageType: sdk | ||
| version: '9.x' |
There was a problem hiding this comment.
Please be sure to use .NET 10 for all bits...
There was a problem hiding this comment.
Fixed in b3eb860 — both .NET version references in the guide are now 10.x.
There was a problem hiding this comment.
Pull request overview
This PR adds a comprehensive CI/CD deployment guide to address a significant documentation gap identified from Discord community feedback (109+ questions about CI/CD integration with no dedicated documentation). The guide covers deploying Aspire applications from GitHub Actions and Azure DevOps pipelines, with detailed setup instructions for both platforms.
Changes:
- Added new CI/CD deployment documentation covering non-interactive deployment, Azure authentication (OIDC/service principals), complete GitHub Actions and Azure DevOps pipeline examples, and CI environment best practices
- Added sidebar entry for "CI/CD pipelines" with translations for all 16 supported locales, positioned before the "Deploy to Azure" section
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/frontend/src/content/docs/deployment/cicd.mdx | New comprehensive guide documenting CI/CD deployment patterns for Aspire applications, including environment variables for non-interactive mode, authentication setup, and complete workflow/pipeline examples |
| src/frontend/config/sidebar/deployment.topics.ts | Added "CI/CD pipelines" sidebar entry with complete translations for all 16 locales (da, de, en, es, fr, hi, id, it, ja, ko, pt-BR, pt-PT, ru, tr, uk, zh-CN) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Set up .NET | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: '9.x' |
There was a problem hiding this comment.
The .NET version specified here is incorrect. According to the Aspire CLI overview documentation, "Starting with Aspire 13.0, the Aspire CLI requires .NET SDK version 10.0.100 or later." This workflow should use dotnet-version: '10.0.x' instead of '9.x' to ensure compatibility with Aspire 13.0 and later.
| dotnet-version: '9.x' | |
| dotnet-version: '10.0.x' |
| displayName: Set up .NET | ||
| inputs: | ||
| packageType: sdk | ||
| version: '9.x' |
There was a problem hiding this comment.
The .NET version specified here is incorrect. According to the Aspire CLI overview documentation, "Starting with Aspire 13.0, the Aspire CLI requires .NET SDK version 10.0.100 or later." This pipeline should use version: '10.0.x' instead of '9.x' to ensure compatibility with Aspire 13.0 and later.
| version: '9.x' | |
| version: '10.0.x' |
| 1. Assign the App Registration a role on the target subscription or resource group: | ||
|
|
||
| ```azurecli title="Azure CLI — Role assignment" | ||
| az role assignment create \ | ||
| --assignee <app-registration-client-id> \ | ||
| --role Contributor \ | ||
| --scope /subscriptions/<subscription-id> |
There was a problem hiding this comment.
The example az role assignment create command assigns the CI app registration the Contributor role at the entire subscription scope, which grants far broader permissions than are needed for a single Aspire deployment. If the GitHub Actions workflow or its identity is compromised, an attacker could create, modify, or delete any resource in the subscription, not just those for this app. Consider scoping the role assignment to a specific resource group (or narrower scope) and using the least-privileged role needed for deployment rather than subscription-wide Contributor.
| 1. Assign the App Registration a role on the target subscription or resource group: | |
| ```azurecli title="Azure CLI — Role assignment" | |
| az role assignment create \ | |
| --assignee <app-registration-client-id> \ | |
| --role Contributor \ | |
| --scope /subscriptions/<subscription-id> | |
| 1. Assign the App Registration a role scoped to the target resource group: | |
| ```azurecli title="Azure CLI — Role assignment" | |
| az role assignment create \ | |
| --assignee <app-registration-client-id> \ | |
| --role Contributor \ | |
| --scope /subscriptions/<subscription-id>/resourceGroups/<resource-group-name> |
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Doc-tester results for All checks passed ✅
Screenshots from the live dev server: the page title, the Cosmos DB Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
deployment/cicd.mdx) covering:9.xto10.xthroughout the guidedeployment.topics.ts) with translationsOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.