-
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
AzurePowerShellV5 task cannot find bicep from path, bicep related commands are failing #14934
Comments
One more comment on this one... I believe the current AZ.Resources version on this AzurePowerShell@5 task is: 3.4.0 [which comes in AZ module 5.7.0]
That particular version has a known issue with failing on warnings for So applying the 3.4.1 patch release of az.resources would be the easiest way to resolve the issue... So this would be part of the AZ module update. . find-module az -allversions | where version -ge 5.7.0 |
select name,version,@{n='az.resources';e={$_.Dependencies | where name -eq 'az.resources' | foreach requiredversion}}
Name Version az.resources
---- ------- ------------
Az 6.0.0 4.1.0
Az 5.9.0 3.5.0
Az 5.8.0 3.4.1
Az 5.7.0 3.4.0
Also for @jikuja in the meantime to get past the issue, you can manually install bicep with the az cli at the moment, it's coming to azure powershell soon. Something like below in your pipeline should be the workaround. if (-not (gcm bicep -ea 0))
{
az bicep install
} if you do manually install it you will also have to manually update the AZ modules.. to avoid what I mentioned above. via the following, on your task. or you could install any version listed above greater than the default 3.4.0.
|
please share the debug logs |
Debug logs? Bicep.exe is an external tool used for deploying ARM templates to Azure. https://github.com/azure/bicep Are you able to update to the newer AZ module for this task 5.8.0 or 5.9.0? |
@brwilkinson if you can share the "Azure PowerShell" task's debug logs from pipeline, we will able to identify the source of error. |
I have outlined that above. The source of the error is a known issue in AZ.resources 3.4.0. Also Bicep is new. Also info above on installing it with the AZ cli. I believe this one.. PR/fix: Azure/azure-powershell#14449 Issue: |
What is the criteria to move to AzurePowerShell@6? Is it a breaking change I.E. Major version change of the AZ modules? Is it possible to just bump the minor Version of AZ modules and stay with AzurePowerShell@5? |
There are three ways to update Az modules version.
|
@jikuja I opened this issue to track your Bicep query. I believe it should be okay to close this issue now ? |
yes. we will close this issue |
This should be re-opened and wait to see if bicep binary is added for hosted agents images or not. The current workarounds given in the virtual-environments ticket are kind of unfeasible:
Maybe AZ.Resources should bundle bicep like AZ CLI does? |
@jikuja I somewhat agree, however this is not the only task that would require Bicep. As an example the "AzureResourceGroupDeploymentV2" and "AzureCLIV2" task would also need it. Then there are GitHub workflows and DevOps pipelines to consider. So this may not be the best place, ... there should be a solution that is easy to manage... We can see if we can figure that out. In the meantime this single line installs it: or with error handling if (-not (gcm bicep -ea 0))
{
az bicep install
} |
Required Information
Type: Bug
Enter Task Name: AzurePowerShellV5
Environment
Issue Description
The task does not find bicep command from path
Task logs
when running following task
The text was updated successfully, but these errors were encountered: