-
Notifications
You must be signed in to change notification settings - Fork 733
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I am in the process of migrating from azd up to aspire deploy in a CI/CD pipeline to deploy to azure.
For some errors that I had aspire deploy failed so my pipeline (GitLab) failed as well.
Now I saw my pipeline succeeded but the app was not updated so I looked at the logs. aspire deploy failed during step 3 but the exit code was 0
Expected Behavior
I would exepect a non zero exit code so my pipeline fails.
Steps To Reproduce
I don't know how to reproduce this because I don't know the root cause yet, but this is my (stripped down) build step
deploy:
stage: staging
image: mcr.microsoft.com/dotnet/sdk:9.0-noble
before_script:
# install az
- curl -sL https://aka.ms/InstallAzureCLIDeb | bash
- az version
# install aspire-cli
- curl -sSL https://aspire.dev/install.sh | bash
- ~/.aspire/bin/aspire --version
script:
- az login --service-principal --username "$AZURE_CLIENT_ID" --password "$AZURE_CLIENT_SECRET" --tenant "$AZURE_TENANT_ID"
# deploy
- ~/.aspire/bin/aspire deploy
- echo "aspire deploy exitcode:$?"and this is the (relevant) output
...
$ ~/.aspire/bin/aspire --version
9.5.2+2fc27528ec03a94f2d6c663c9fa2392a9568ee41
$ az login --service-principal --username "$AZURE_CLIENT_ID" --password "$AZURE_CLIENT_SECRET" --tenant "$AZURE_TENANT_ID"
...
$ ~/.aspire/bin/aspire deploy
🔬 Checking project type...: AppHost.csproj
🛠 Building apphost... AppHost.csproj
🛠 Generating artifacts...
Step 1: Analyzing model.
✅ COMPLETED: Analyzing model. completed successfully
════════════════════════════════════════════════════════════════════════════════
Step 2: Validating Azure CLI authentication
✅ COMPLETED: Azure CLI authentication validated successfully
════════════════════════════════════════════════════════════════════════════════
Step 3: Deploying Azure resources
Deploying cae: 0%
Deploying postgres: 0%
Deploying postgres-kv: 0%
Deploying messaging: 0%
Deploying storage: 0%
Deploying azureopenai: 0%
Deploying app-identity: 0%
Deploying app-roles-postgres-kv: 0%
Deploying app-roles-messaging: 0%
Deploying app-roles-storage: 0%
Deploying functions-identity: 0%
Deploying functions-roles-storage: 0%
Deploying functions-roles-messaging: 0%
Deploying functions-roles-azureopenai: 0%
Deploying functions-roles-postgres-kv: 0%
Deploying cae: 0%
✗ FAILED: Deploying postgres: 0%
✗ FAILED: Deploying postgres-kv: 0%
Deploying messaging: 0%
Deploying storage: 0%
Deploying azureopenai: 0%
Deploying app-identity: 0%
✗ FAILED: Deploying app-roles-postgres-kv: 0%
Deploying app-roles-messaging: 0%
✗ FAILED: Deploying app-roles-storage: 0%
✗ FAILED: Deploying functions-identity: 0%
Deploying functions-roles-storage: 0%
✗ FAILED: Deploying functions-roles-messaging: 0%
Deploying functions-roles-azureopenai: 0%
Deploying functions-roles-postgres-kv: 0%
❌ FAILED: Failed to deploy Azure resources
════════════════════════════════════════════════════════════════════════════════
✗ DEPLOYMENT FAILED: Deployment completed with errors
$ echo "aspire deploy exitcode:$?"
aspire deploy exitcode:0
As you can see, the deployment of some resources failed so
Step 3: Deploying Azure resources
...
✗ FAILED: Deploying postgres: 0%
...
❌ FAILED: Failed to deploy Azure resources
so the process stops. But the exit code is 0
Exceptions (if any)
No response
.NET Version info
No response
Anything else?
No response
Copilot