I'm trying to run a task within GitLab CI using the official MS Azure-CLI docker image. It fails at the first step, logging in using the "az login" command. I'm using a service principal login with a secret, all stored as GitLab CI variables. Using this command with the CI job:
az login --service-principal --username="${AZURE_APP_ID}" --password="${AZURE_CLIENT_SECRET}" --tenant=${AZURE_TENANT_ID}
gives me the error:
usage error: --service-principal --username NAME --password SECRET --tenant TENANT
Yet if I run the Azure-CLI docker image locally and run the exact same command it works fine. Why is this not working? What format do I need to use to get the damn thing working?