-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Azure Pipelines Azure CLI task - no colors when doing Bicep deployment #15473
Comments
This isn't specific to bicep templates either. I have a release stage to do a what-if analysis for approval on a compiled bicep template (so json). The colour coding would be really helpful. |
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days |
@bishal-pdMSFT is there maybe any action planned on this issue? |
@NAGA-BANDI can you please ask someone to look at thia |
Hi @chudytom 1.As per our understanding we believe from AzureCLI@2 task script type was selected as PowerShellCore which is responsible for the color coding. Is the agent machine(self-hosted) having PowerShell core installed explicitly or is it a MS Hosted agent? 2.Please share the complete logs for further investigation. Both successful logs and failure logs from the task. |
@v-nagarajku Colors are also not showing on hosted ubuntu-latest agent either, with task AzureCLI@2 - task: AzureCLI@2
inputs:
azureSubscription: <connection name>
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
az --version
az deployment sub create --what-if --location <....params> also running on hosted windows-latest agent with |
@v-nagarajku Any update here ? |
@ekersale. This feature is not implemented. At present, we could not prioritize it, due to other critical issues in our queue. |
Anybody got some workaround for this? |
Up, it would be really handy |
Come on MSFT, this is basics! |
MSFT Team, this is important! |
Yes MSFT we are waiting on it. |
Any update on this topic ? Azure declarative IaC language which is recommended is Bicep (see green box here: https://learn.microsoft.com/en-us/azure/templates/) Can we please have a little bit of color for bicep in Azure DevOps ? Note: color is working with terraform.... |
I did some digging on this, and chatted to @JamieMagee who gave me some great pointers. Current theory:
We do not believe this was a deliberate decision - just an accidental result of the indirection. An interesting test would be to try and set the env variable |
Thanks for digging this @anthony-c-martin . Just tried it without success :/ |
Seems related to microsoft/azure-pipelines-agent#1569. AzureCLI uses 8bit color codes, which are unsupported by ADO. |
There is some not pretty workaround for PowerShell https://paul-mackinnon.medium.com/azure-devops-ansi-colour-coding-df8ef7406422 |
Whatever I try, I can't output the escape sequence (ex: ``e[34m) even when trying to save az cli output in a file. ( It would be nice to have an option like PY_COLORS or ANSIBLE_FORCE_COLOR |
+1 would be really useful to have |
+1 basic feature really.. |
Required Information
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Bug
Enter Task Name: AzureCLI@2
Environment
Server - Azure Pipelines
dongenergy-p/Power Hub/Pipelines/flexp-infra-bicep/20211103.7
Agent - Hosted or Private:
Issue Description
I tried to deployed infrastructure using Azure Bicep. I did it using Azure CLI and specifically AzureCLI@2 task. It works, however when I use --what-if functionality the changes I see on the screen have no colors, which make the output much harder to read. When I run the same commands from my local CLI all the colors are visible.
Command used -
az deployment group create -f infrastructure/bicep/<project-name>.bicep --subscription=<project-name> -g <project-name> --parameters env=dev --mode=complete --name=<project-name>_20211103_1243 --what-if
Current behavior:
Expected behavior (from my local machine)
Task logs
Will provide it later if really needed
Troubleshooting
Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting
Done
Error logs
No errors even after enabling system diagnostics
The text was updated successfully, but these errors were encountered: