Skip to content

[Bug Report]: bicep publish script #4113

@demargkhrab

Description

@demargkhrab

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions