Add PR preview environment with #deploy comment trigger - #9
Add PR preview environment with #deploy comment trigger#9Christopher MANEU (cmaneu) with Copilot wants to merge 6 commits into
Conversation
Co-authored-by: cmaneu <790974+cmaneu@users.noreply.github.com>
Co-authored-by: cmaneu <790974+cmaneu@users.noreply.github.com>
Co-authored-by: cmaneu <790974+cmaneu@users.noreply.github.com>
|
Copilot ensures we can use OIDC for connecting GitHub to Azure |
Co-authored-by: cmaneu <790974+cmaneu@users.noreply.github.com>
Added OIDC authentication support in commit af21ff6. The workflows now support both authentication methods:
Both workflows include See updated |
|
Copilot Azure Container Instances don't do SSL termination by default, how this could work and how can you fix it? |
1 similar comment
|
Copilot Azure Container Instances don't do SSL termination by default, how this could work and how can you fix it? |
Co-authored-by: cmaneu <790974+cmaneu@users.noreply.github.com>
Azure Container Instances don't provide built-in SSL/TLS termination, so preview environments use HTTP only. This is documented in commit ee43488. Why HTTP is acceptable for PR previews:
If HTTPS is required, 4 options are documented:
See
Azure Container Instances don't provide built-in SSL/TLS termination, so preview environments use HTTP only. This is documented in commit ee43488. Why HTTP is acceptable for PR previews:
If HTTPS is required, 4 options are documented:
See |
Enables quick testing of PRs in isolated Azure environments. Comment
#deployon any PR to spin up a live preview with app + Cosmos DB emulator. Resources auto-cleanup on PR close. Supports both OIDC and service principal authentication for Azure.Note: Preview environments use HTTP only as Azure Container Instances don't provide built-in SSL/TLS termination. Comprehensive documentation provided for HTTPS options if required.
Implementation
GitHub-agnostic deployment script (
scripts/deploy-pr-preview.sh)pr-{NUMBER}-{SHA}andpr-{NUMBER}-latestDeploy workflow (
.github/workflows/pr-preview-deploy.yml)#deploycomment (issue_comment event)http://iq-pr-{NUMBER}.{region}.azurecontainer.ioCleanup workflow (
.github/workflows/pr-preview-cleanup.yml)Multi-container template (
azure-container-instance.yml)SSL/TLS Considerations
Azure Container Instances don't provide built-in SSL/TLS termination, so preview environments are accessible via HTTP only. This is acceptable for temporary testing environments with no production data.
HTTPS options documented if required:
See
docs/PR-PREVIEW.mdfor detailed SSL/TLS options and implementation guidance.Configuration Required
Set GitHub secrets before use:
For OIDC Authentication (Recommended):
AZURE_CLIENT_ID- Application (client) IDAZURE_TENANT_ID- Directory (tenant) IDAZURE_SUBSCRIPTION_ID- Subscription IDACR_NAME- Container registry nameAZURE_RESOURCE_GROUP- Preview deployment resource groupAZURE_LOCATION- (optional) Defaults toeastusFor Service Principal Authentication (Legacy):
AZURE_CREDENTIALS- Service principal JSON with Contributor + AcrPush rolesACR_NAME- Container registry nameAZURE_RESOURCE_GROUP- Preview deployment resource groupAZURE_LOCATION- (optional) Defaults toeastusSee
docs/PR-PREVIEW-SETUP.mdfor detailed setup instructions for both authentication methods.Usage
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.