-
Notifications
You must be signed in to change notification settings - Fork 37
CICD workflow fix for azd deployment #6
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.
Pull Request Overview
This pull request refactors the Azure deployment workflow to improve authentication handling and output extraction reliability. The changes remove verbose authentication status checking, modernize scripting to use PowerShell, and replace fragile JSON parsing with environment variables.
- Removes detailed authentication status check step that provided extensive error guidance
- Converts Azure Developer CLI authentication logic from bash to PowerShell
- Updates service endpoint extraction to use environment variables instead of parsing CLI output
| if ($env:USE_OIDC -eq "true" -and "${{ steps.azure-login-oidc.outcome }}" -eq "success") { | ||
| Write-Host "🔐 Attempting azd authentication with OIDC..." | ||
| azd auth login ` | ||
| --client-id "$Env:AZURE_CLIENT_ID" ` | ||
| --federated-credential-provider "github" ` | ||
| --tenant-id "$Env:AZURE_TENANT_ID" | ||
| elif [ "${{ env.USE_OIDC }}" = "false" ] && [ "${{ steps.azure-login-sp.outcome }}" = "success" ]; then | ||
| echo "🔐 Attempting azd authentication with Service Principal..." | ||
| --client-id $env:AZURE_CLIENT_ID ` | ||
| --federated-credential-provider github ` | ||
| --tenant-id $env:AZURE_TENANT_ID | ||
| } | ||
| elseif ($env:USE_OIDC -eq "false" -and "${{ steps.azure-login-sp.outcome }}" -eq "success") { |
Copilot
AI
Sep 26, 2025
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.
PowerShell string comparison should use quotes around the GitHub expression. The current syntax \"${{ steps.azure-login-oidc.outcome }}\" may not evaluate correctly in PowerShell conditional statements. Consider using -eq 'success' instead.
| --federated-credential-provider github ` | ||
| --tenant-id $env:AZURE_TENANT_ID | ||
| } | ||
| elseif ($env:USE_OIDC -eq "false" -and "${{ steps.azure-login-sp.outcome }}" -eq "success") { |
Copilot
AI
Sep 26, 2025
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.
Same PowerShell string comparison issue as above. The GitHub expression \"${{ steps.azure-login-sp.outcome }}\" should be properly quoted or use single quotes for the comparison value.
| elseif ($env:USE_OIDC -eq "false" -and "${{ steps.azure-login-sp.outcome }}" -eq "success") { | |
| elseif ($env:USE_OIDC -eq "false" -and "${{ steps.azure-login-sp.outcome }}" -eq 'success') { |
…handoffs Hotfix/agent context and handoffs
adding ACS capabilities, integrated with the frontend
CICD workflow fix for azd deployment
…-context-and-handoffs Hotfix/agent context and handoffs
This pull request refactors the Azure deployment workflow in
.github/workflows/deploy-azd.ymlto streamline authentication handling, modernize scripting practices, and simplify output extraction. The most significant changes are the removal of a detailed authentication status check, conversion of authentication logic to PowerShell, and updates to service endpoint extraction.Authentication handling:
Service endpoint extraction:
FRONTEND_CONTAINER_APP_FQDNandBACKEND_CONTAINER_APP_FQDNinstead of parsingazd showoutput, making the workflow more robust and less dependent on CLI output parsing.Network whitelist management: