Add cloud-agnostic CI/CD pipeline deployment guide for Aspire applications#458
Add cloud-agnostic 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
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.
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:
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Hey @copilot, please update this to be cloud agnostic. Right now it's specific to Azure - we really need it to be general/conceptual guidance on CI/CD for deploying to perhaps any container registry. |
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Done in c1c02b7. The guide is now cloud-agnostic:
The page structure is now:
|
|
Hey @copilot, please also link to /fundamentals/app-lifecycle/#step-3-build-app-create--push-image-to-ghcr where it makes sense to. |
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Added in 7b5e36e — a |
|
Hey @copilot - please update the steps to install the CLI based on how we have it documented EVERYWHERE else. Not the .NET global tool. |
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Updated in 760718f. Both examples now use the canonical install script: GitHub Actions: - name: Install Aspire CLI
run: |
curl -sSL https://aspire.dev/install.sh | bash
echo "$HOME/.aspire/bin" >> $GITHUB_PATHAzure DevOps: - script: |
curl -sSL https://aspire.dev/install.sh | bash
echo "##vso[task.prependpath]$HOME/.aspire/bin"
displayName: Install Aspire CLI |
IEvangelist
left a comment
There was a problem hiding this comment.
Hey @copilot, please see my new comments - and could you take a screen shot of the page so that we might see how it looks, and add it to the PR description?
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Screenshot added to the PR description and below — the page is rendering correctly with the sidebar entry "CI/CD pipelines" highlighted, the Mermaid architecture diagram, and the updated Steps component: |
alistairmatthews
left a comment
There was a problem hiding this comment.
@copilot Please implement my suggestions.
| import { Aside, Steps, Tabs, TabItem } from '@astrojs/starlight/components'; | ||
| import LearnMore from '@components/LearnMore.astro'; | ||
|
|
||
| Deploying Aspire applications from continuous integration and continuous delivery (CI/CD) pipelines follows a consistent pattern regardless of your target platform: generate deployment artifacts, push container images to a registry, then apply the artifacts using your preferred tooling. |
There was a problem hiding this comment.
This introduction is good, but please add a short two or three sentence summary of what the students will learn in this article.
| 1. **Build & publish** — `aspire publish` builds your .NET project container images and generates deployment artifacts (Docker Compose files, Kubernetes manifests, etc.) with image name placeholders. | ||
|
|
||
| 1. **Push** — Your pipeline tags the locally-built images and pushes them to a container registry such as GitHub Container Registry, Docker Hub, Amazon ECR, or Azure Container Registry. | ||
|
|
||
| 1. **Deploy** — Your pipeline applies the generated artifacts using the appropriate tooling (`kubectl apply`, `docker compose up`, etc.), substituting the image placeholders with the pushed registry addresses. |
There was a problem hiding this comment.
| 1. **Build & publish** — `aspire publish` builds your .NET project container images and generates deployment artifacts (Docker Compose files, Kubernetes manifests, etc.) with image name placeholders. | |
| 1. **Push** — Your pipeline tags the locally-built images and pushes them to a container registry such as GitHub Container Registry, Docker Hub, Amazon ECR, or Azure Container Registry. | |
| 1. **Deploy** — Your pipeline applies the generated artifacts using the appropriate tooling (`kubectl apply`, `docker compose up`, etc.), substituting the image placeholders with the pushed registry addresses. | |
| 1. **Build and publish**: `aspire publish` builds your .NET project container images and generates deployment artifacts with image name placeholders. | |
| 1. **Push**: Your pipeline tags the locally-built images and pushes them to a container registry such as GitHub Container Registry, Docker Hub, Amazon ECR, or Azure Container Registry. | |
| 1. **Deploy**: Your pipeline applies the generated artifacts using the appropriate tooling (`kubectl apply`, `docker compose up`, and so on), substituting the image placeholders with the pushed registry addresses. |
| </LearnMore> | ||
|
|
||
| ### Docker Hub | ||
|
|
There was a problem hiding this comment.
| Use a script like this to push your images to Docker Hub: | |
| docker push $DOCKERHUB_USERNAME/myapp-api:$IMAGE_TAG | ||
| ``` | ||
|
|
||
| Store `DOCKERHUB_TOKEN` and `DOCKERHUB_USERNAME` as secrets in your pipeline. Generate the token from [hub.docker.com](https://hub.docker.com) under **Account settings > Personal access tokens**. |
There was a problem hiding this comment.
| Store `DOCKERHUB_TOKEN` and `DOCKERHUB_USERNAME` as secrets in your pipeline. Generate the token from [hub.docker.com](https://hub.docker.com) under **Account settings > Personal access tokens**. | |
| Protect the sensitive `DOCKERHUB_TOKEN` and `DOCKERHUB_USERNAME` values by storing them as secrets in your pipeline. Generate the token from [hub.docker.com](https://hub.docker.com) under **Account settings > Personal access tokens**. |
|
|
||
| ### Other registries | ||
|
|
||
| Other container registries (Amazon ECR, Azure Container Registry, Google Artifact Registry, JFrog Artifactory, and self-hosted registries) follow the same pattern: authenticate with `docker login`, tag your image with the registry hostname, and push. Refer to your registry's authentication documentation for the specific login command. |
There was a problem hiding this comment.
| Other container registries (Amazon ECR, Azure Container Registry, Google Artifact Registry, JFrog Artifactory, and self-hosted registries) follow the same pattern: authenticate with `docker login`, tag your image with the registry hostname, and push. Refer to your registry's authentication documentation for the specific login command. | |
| Other container registries, such as Amazon ECR, Azure Container Registry, Google Artifact Registry, JFrog Artifactory, and self-hosted registries, follow the same pattern: | |
| - Authenticate with `docker login`. | |
| - Tag your image with the registry hostname. | |
| - Push your images. | |
| Refer to your registry's authentication documentation for the specific login command. |
|
|
||
| ## GitHub Actions workflow | ||
|
|
||
| The following complete workflow generates artifacts with `aspire publish`, pushes images to GitHub Container Registry, and applies a Docker Compose deployment. Customize the deploy step for your own target (Kubernetes, a cloud provider, etc.). |
There was a problem hiding this comment.
| The following complete workflow generates artifacts with `aspire publish`, pushes images to GitHub Container Registry, and applies a Docker Compose deployment. Customize the deploy step for your own target (Kubernetes, a cloud provider, etc.). | |
| The following complete workflow generates artifacts with `aspire publish`, pushes images to GitHub Container Registry, and applies a Docker Compose deployment. Customize the deploy step for your own target (Kubernetes, a cloud provider, or something else). |
|
|
||
| ### Terminal output and formatting | ||
|
|
||
| The Aspire CLI detects whether it's running in a CI environment and adjusts its output accordingly (no interactive prompts, plain-text progress). If you see garbled or ANSI escape codes in logs, set the `NO_COLOR` environment variable: |
There was a problem hiding this comment.
| The Aspire CLI detects whether it's running in a CI environment and adjusts its output accordingly (no interactive prompts, plain-text progress). If you see garbled or ANSI escape codes in logs, set the `NO_COLOR` environment variable: | |
| The Aspire CLI detects whether it's running in a CI environment and adjusts its output accordingly, with no interactive prompts and plain-text progress. If you see garbled or ANSI escape codes in logs, set the `NO_COLOR` environment variable: |
| - .NET container image builds | ||
| - Container registry image push (varies with image size and network speed) | ||
| - Provisioning and startup of deployment targets |
There was a problem hiding this comment.
| - .NET container image builds | |
| - Container registry image push (varies with image size and network speed) | |
| - Provisioning and startup of deployment targets | |
| - .NET container image builds. | |
| - Container registry image pushes. These times can vary with image size and network speed). | |
| - Provisioning and startup of deployment targets. |
Co-authored-by: alistairmatthews <41286777+alistairmatthews@users.noreply.github.com>
All suggestions implemented in 5075d7a:
|

deployment/cicd.mdx)10.x/fundamentals/app-lifecycle/#step-3-build-app-create--push-image-to-ghcrdotnet tool install -g aspire.cliwith canonical install script<Steps>componentPage preview
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.