ResourceModules icon indicating copy to clipboard operation
ResourceModules copied to clipboard

[Bug Report]: bicep publish script

Open demargkhrab opened this issue 3 years ago • 0 comments

Describe the bug

following this page to publish modules manually.

i get bicep publish is not a valid command error, the scrip does a "bicep publish" and not an "az bicep publish" .... there seems to be no reference to bicep publish anymore.

To reproduce

when i load the script and run the commands as per the setup page ... this is the example below which is fine, have added the paths in here.

$modules = Get-ChildItem -Path 'c:\repos\resourcemodules' -Recurse -Filter 'main.bicep'
$modules.FullName | ForEach-Object -Parallel {
   . 'c:\repos\resourcemodules\utilities\pipelines\resourcepublish\Publish-ModuleToPrivateBicepRegistry.ps1'
   Publish-ModuleToPrivateBicepRegistry -TemplateFilePath $_ -ModuleVersion '<moduleVersion>' -BicepRegistryName '<registryName>' -BicepRegistryRgName '<bicepRGName>'
} -ThrottleLimit 4

im on azcli 2.53.0 bicep cli version 0.22.6

i got around this by updating the publish function in the script to be az bicep publish -- file .... then keep the rest of the path as is ....

you also have to use az login and not Connect-AzAccount.

Code snippet

No response

Relevant log output

No response

demargkhrab avatar Oct 20 '23 03:10 demargkhrab