-
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -140,48 +140,6 @@ jobs: | |||||
| id: azure-login-sp | ||||||
| with: | ||||||
| creds: '{"clientId":"${{ env.AZURE_CLIENT_ID }}","clientSecret":"${{ env.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ env.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ env.AZURE_TENANT_ID }}"}' | ||||||
|
|
||||||
| - name: 🚨 Check Authentication Status | ||||||
| run: | | ||||||
| OIDC_OUTCOME="${{ steps.azure-login-oidc.outcome }}" | ||||||
| SP_OUTCOME="${{ steps.azure-login-sp.outcome }}" | ||||||
|
|
||||||
| if [ "${{ env.USE_OIDC }}" = "true" ]; then | ||||||
| if [ "$OIDC_OUTCOME" = "failure" ] || [ "$OIDC_OUTCOME" = "skipped" ]; then | ||||||
| echo "⚠️ OIDC authentication failed - insufficient permissions or missing federated credentials" | ||||||
| echo "This is normal for:" | ||||||
| echo " - Forked repositories" | ||||||
| echo " - Repositories without 'id-token: write' permissions" | ||||||
| echo " - Missing Azure AD federated identity credentials" | ||||||
| echo "" | ||||||
| echo "💡 Solutions:" | ||||||
| echo " 1. Add AZURE_CLIENT_SECRET to repository secrets for service principal auth" | ||||||
| echo " 2. Configure federated identity credentials in Azure AD" | ||||||
| echo " 3. Enable 'id-token: write' permissions in repository settings" | ||||||
|
|
||||||
| if [ "${{ github.event_name }}" = "pull_request" ]; then | ||||||
| echo "ℹ️ For PR previews, functionality will be limited" | ||||||
| echo "auth_success=false" >> $GITHUB_OUTPUT | ||||||
| else | ||||||
| echo "❌ For deployments, authentication is required" | ||||||
| exit 1 | ||||||
| fi | ||||||
| else | ||||||
| echo "✅ Azure OIDC authentication successful" | ||||||
| echo "auth_success=true" >> $GITHUB_OUTPUT | ||||||
| fi | ||||||
| else | ||||||
| if [ "$SP_OUTCOME" = "success" ]; then | ||||||
| echo "✅ Azure Service Principal authentication successful" | ||||||
| echo "auth_success=true" >> $GITHUB_OUTPUT | ||||||
| else | ||||||
| echo "❌ Service Principal authentication failed" | ||||||
| if [ "${{ github.event_name }}" != "pull_request" ]; then | ||||||
| exit 1 | ||||||
| fi | ||||||
| echo "auth_success=false" >> $GITHUB_OUTPUT | ||||||
| fi | ||||||
| fi | ||||||
|
|
||||||
| - name: ⚙️ Setup Azure Developer CLI | ||||||
| uses: Azure/setup-azd@v2 | ||||||
|
|
@@ -195,22 +153,24 @@ jobs: | |||||
| continue-on-error: true # Don't fail if authentication doesn't work | ||||||
| id: azd-login | ||||||
| run: | | ||||||
| if [ "${{ env.USE_OIDC }}" = "true" ] && [ "${{ steps.azure-login-oidc.outcome }}" = "success" ]; then | ||||||
| echo "🔐 Attempting azd authentication with OIDC..." | ||||||
| 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") { | ||||||
|
||||||
| 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') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,70 +1,73 @@ | ||
| ## Core FastAPI microservices stack | ||
| fastapi>=0.104.0 | ||
| uvicorn[standard]>=0.24.0 | ||
| pydantic>=2.5.0 | ||
| pydantic-settings>=2.1.0 | ||
| starlette>=0.27.0 | ||
| redis>=5.0.0 | ||
| aiohttp>=3.9.0 | ||
| python-multipart>=0.0.6 | ||
| pyjwt | ||
|
|
||
| # Azure services - Linux App Service compatible versions | ||
| azure-cosmos>=4.5.0 | ||
| azure-identity>=1.15.0 | ||
| azure-storage-blob>=12.19.0 | ||
| azure-cognitiveservices-speech>=1.45.0 | ||
| azure-communication-callautomation>=1.4.0 | ||
| azure-communication-identity>=1.5.0 | ||
| azure-keyvault-secrets>=4.7.0 | ||
| azure-eventgrid>=4.10.0 | ||
|
|
||
| # Azure monitoring and telemetry | ||
| azure-monitor-opentelemetry>=1.6.11 | ||
| opentelemetry-sdk | ||
| opentelemetry-instrumentation | ||
| opentelemetry-instrumentation-fastapi | ||
| opentelemetry-instrumentation-requests | ||
| opentelemetry-instrumentation-urllib | ||
| opentelemetry-instrumentation-urllib3 | ||
| opentelemetry-instrumentation-openai-v2 | ||
|
|
||
| # Azure + misc | ||
| azure-core>=1.29.0 | ||
| colorama>=0.4.6 | ||
|
|
||
| # AI and OpenAI integration | ||
| openai>=1.50.0 | ||
|
|
||
| # HTTP clients - stable versions | ||
| httpx>=0.27.0 | ||
| aiofiles>=23.0.0 | ||
|
|
||
| # Async and networking tools | ||
| tenacity>=8.5.0 | ||
| # Load testing (moved from end) | ||
| locust>=2.20.0 | ||
| # WebSocket and communication libraries | ||
| websockets>=12.0 | ||
| websocket-client>=1.6.0 | ||
| pytest>=7.4.0 | ||
| backoff>=2.0.0 | ||
|
|
||
| # Data processing and YAML configuration | ||
| numpy>=1.24.0 | ||
| python-dotenv>=1.0.0 | ||
| python-json-logger>=2.0.0 | ||
| jinja2>=3.1.0 | ||
| typing-extensions>=4.8.0 | ||
| langdetect>=1.0.9 | ||
| PyYAML>=6.0.0 | ||
| pyyaml-include>=1.3.0 | ||
|
|
||
| # Audio processing for Live Voice API and samples | ||
| sounddevice>=0.4.6 | ||
| pyaudio>=0.2.11 | ||
| wave # Part of standard library, but may need explicit declaration | ||
|
|
||
| # Database drivers | ||
| pymongo>=4.6.0 | ||
| rapidfuzz>=3.13.0 | ||
| ## Core FastAPI microservices stack | ||
| fastapi>=0.104.0 | ||
| uvicorn[standard]>=0.24.0 | ||
| pydantic>=2.5.0 | ||
| pydantic-settings>=2.1.0 | ||
| starlette>=0.27.0 | ||
| redis>=5.0.0 | ||
| aiohttp>=3.9.0 | ||
| python-multipart>=0.0.6 | ||
| pyjwt | ||
|
|
||
| # Azure services - Linux App Service compatible versions | ||
| azure-cosmos>=4.5.0 | ||
| azure-identity>=1.15.0 | ||
| azure-storage-blob>=12.19.0 | ||
| azure-cognitiveservices-speech>=1.45.0 | ||
| azure-communication-callautomation>=1.4.0 | ||
| azure-communication-identity>=1.5.0 | ||
| azure-keyvault-secrets>=4.7.0 | ||
| azure-eventgrid>=4.10.0 | ||
|
|
||
| # Azure monitoring and telemetry | ||
| azure-monitor-opentelemetry>=1.6.11 | ||
| opentelemetry-sdk | ||
| opentelemetry-instrumentation | ||
| opentelemetry-instrumentation-fastapi | ||
| opentelemetry-instrumentation-requests | ||
| opentelemetry-instrumentation-urllib | ||
| opentelemetry-instrumentation-urllib3 | ||
| opentelemetry-instrumentation-openai-v2 | ||
|
|
||
| # Azure + misc | ||
| azure-core>=1.29.0 | ||
| colorama>=0.4.6 | ||
|
|
||
| # AI and OpenAI integration | ||
| openai>=1.50.0 | ||
|
|
||
| # HTTP clients - stable versions | ||
| httpx>=0.27.0 | ||
| aiofiles>=23.0.0 | ||
|
|
||
| # Async and networking tools | ||
| tenacity>=8.5.0 | ||
| # Load testing (moved from end) | ||
| locust>=2.20.0 | ||
| # WebSocket and communication libraries | ||
| websockets>=12.0 | ||
| websocket-client>=1.6.0 | ||
| pytest>=7.4.0 | ||
| backoff>=2.0.0 | ||
|
|
||
| # Data processing and YAML configuration | ||
| numpy>=1.24.0 | ||
| python-dotenv>=1.0.0 | ||
| python-json-logger>=2.0.0 | ||
| jinja2>=3.1.0 | ||
| typing-extensions>=4.8.0 | ||
| langdetect>=1.0.9 | ||
| PyYAML>=6.0.0 | ||
| pyyaml-include>=1.3.0 | ||
|
|
||
| # Audio processing for Live Voice API and samples | ||
| sounddevice>=0.4.6 | ||
| pyaudio>=0.2.11 | ||
| # wave is in the Python standard library; no pip package required | ||
|
|
||
| # Database drivers | ||
| pymongo>=4.6.0 | ||
| rapidfuzz>=3.13.0 | ||
|
|
||
| # Testing and linting tools | ||
| locust |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.