-
Notifications
You must be signed in to change notification settings - Fork 267
Description
Output from azd version
azd version 0.7.0-beta.1 (commit 9ce7165)
Describe the bug
I have to add duplicate steps for azd login inside a single job within GH Action using the new Federated trust with Github. It appears either the token generated from azd login was expiring too soon or execution of azd deploy commands were wiping it out. The reason wasn’t shown in logs, just that I was not logged in and needed to run azd login, here was the message:
Error: not logged in, run azd login to login
Error: Process completed with exit code 1.
Note that prior to using the federated GH integration (using SPN Secret), this was not an issue with azd.
To Reproduce
Setup azd for GH actions by running azd pipeline config, then execute these as different steps in github action, on execution of #3, I got a request to azd login. In my scenario, step #2 took roughly 20 minutes to complete.
1- azd login --client-id ${{ secrets.AZURE_CLIENT_ID }} --federated-credential-provider "github" --tenant-id ${{ secrets.AZURE_TENANT_ID }}
2 - azd provision --no-prompt
3 - azd env set AZURE_RESOURCE_GROUP ${{ secrets.AZURE_ENV_NAME }}daily2-rg
Expected behavior
Did not expect to need to azd login again.
Environment
Information on your environment:
Ubuntu-latest in GH Action runner, using image: mcr.microsoft.com/azure-dev-cli-apps:latest