Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo
For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
If you have an issue or request for the Azure Pipelines service, use developer community instead:
https://developercommunity.visualstudio.com/spaces/21/index.html )
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Bug
Enter Task Name: Azure CLI Inline script
list here (V# not needed): v1
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
Server - Azure Pipelines or TFS on-premises?
If using TFS on-premises, provide the version:
If using Azure Pipelines, provide the account name, team project name, build definition name/build number:
Agent - Hosted or Private:
If using Hosted agent, provide agent queue name:
If using private agent, provide the OS of the machine running the agent and the agent version:
From about yesterday we are unable to deploy with azure cli script, for some reason we are getting "2020-02-20T21:47:46.4285528Z ##[error]Script failed with error: Error: The process 'D:\a_temp\azureclitaskscript1582235228379.bat' failed because one or more lines were written to the STDERR stream" even though there is no errors in the logs (even in debug).
Command this Inline is "az storage container create --account-name * --name *"
[Enable debug logging and please provide the zip file containing all the logs for a speedy resolution]
Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting
[Insert error from the logs here for a quick overview]
2020-02-20T21:47:46.4285528Z ##[error]Script failed with error: Error: The process 'D:\a_temp\azureclitaskscript1582235228379.bat' failed because one or more lines were written to the STDERR stream
I'm also having this error.
@goriunov @goatandsheep Thanks for reporting the issue. To confirm, you are able to see the errors written to stderr in the logs correct? Could you share them as well?
@issacnitin from the logs which i have (debug enabled) only 3 lines contain error and nothing else:
2020-02-23T21:49:20.9367440Z ##[error]Script failed with error: Error: The process 'D:\a\_temp\azureclitaskscript1582494522128.bat' failed because one or more lines were written to the STDERR stream
2020-02-23T21:49:20.9375412Z ##[debug]Processed: ##vso[task.issue type=error;]Script failed with error: Error: The process 'D:\a\_temp\azureclitaskscript1582494522128.bat' failed because one or more lines were written to the STDERR stream
2020-02-23T21:49:20.9376402Z ##[debug]Processed: ##vso[task.complete result=Failed;]Script failed with error: Error: The process 'D:\a\_temp\azureclitaskscript1582494522128.bat' failed because one or more lines were written to the STDERR stream
@goriunov I'm able to reproduce the issue. We had a bug in the Azure CLI task, where if you have "Fail on Standard Error" checked, the script will always fail. The issue has been fixed and is in due rollout. For now, as a workaround, please uncheck the option to unblock your pipeline.
Related issue: https://github.com/microsoft/azure-pipelines-tasks/issues/12143
Closing the issue, as issue is already fixed and is in rollout.
I got this issue today. Have you rolled out the fix already?
This is happening to me as well in Azure Pipelines
we too are getting this....
@goriunov I'm able to reproduce the issue. We had a bug in the Azure CLI task, where if you have "Fail on Standard Error" checked, the script will always fail. The issue has been fixed and is in due rollout. For now, as a workaround, please uncheck the option to unblock your pipeline.
Should we still be doing this work around in May?
This issue could still be happening if your script is writing to stderr.
In v2 of Azure CLI task we have made improvements to print the stderr logs. You can upgrade to v2 and see what logs are being written to stderr by your script.
Azure CLI task v2 causes the pipeline to fail although everything was successfully deployed. Checking the logs written to stderr by my script showed errors that were supposed to be informational logs from running the command az eventgrid event-subscription create. When will this be fixed?
Task
Task: AzureCLI@2
...
scriptType: bash
failOnStandardError: true
Command in script
az eventgrid event-subscription create --name "es-$app_name" \
--source-resource-id $eventgrid_id \
--endpoint $app_id/functions/eventGrid_format --endpoint-type azurefunction
Logs written to stderr
2020-06-09T00:34:02.5424246Z ##[error]The behavior of this command has been altered by the following extension: eventgrid
2020-06-09T00:34:02.5434374Z ##[error]The behavior of this command has been altered by the following extension: eventgrid
2020-06-09T00:34:02.5436270Z ##[error]If the provided endpoint does not support subscription validation handshake, navigate to the validation URL that you receive in the subscription validation event, in order to complete the event subscription creation or update. For more details, please visit http://aka.ms/esvalidation
2020-06-09T00:34:02.5437644Z ##[error]The behavior of this command has been altered by the following extension: eventgrid
2020-06-09T00:34:02.5438645Z ##[error]The behavior of this command has been altered by the following extension: eventgrid
2020-06-09T00:34:02.5441016Z ##[error]If the provided endpoint does not support subscription validation handshake, navigate to the validation URL that you receive in the subscription validation event, in order to complete the event subscription creation or update. For more details, please visit http://aka.ms/esvalidation
2020-06-09T00:34:02.5442431Z ##[error]The behavior of this command has been altered by the following extension: eventgrid
2020-06-09T00:34:02.5443524Z ##[error]The behavior of this command has been altered by the following extension: eventgrid
2020-06-09T00:34:02.5445044Z ##[error]If the provided endpoint does not support subscription validation handshake, navigate to the validation URL that you receive in the subscription validation event, in order to complete the event subscription creation or update. For more details, please visit http://aka.ms/esvalidation
2020-06-09T00:34:02.5446488Z ##[error]The behavior of this command has been altered by the following extension: eventgrid
2020-06-09T00:34:02.5447512Z ##[error]Script has output to stderr. Failing as failOnStdErr is set to true.
@Sarah-Aly Please take it up with https://github.com/Azure/azure-cli
They'll be able to help you regarding why the informational text is written to stderr
Most helpful comment
This is happening to me as well in Azure Pipelines