Azure / Azure/ResourceModules

[Bug Report]: bicep publish script

Open
#4,113 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
PowerShell
Stars
737
Forks
436
Avg merge
10d 7h
Merged PRs (30d)
1

Description

### Describe the bug

following this [page](https://github.com/Azure/ResourceModules/wiki/Getting%20started%20-%20Scenario%201%20Consume%20library#3-test-and-publish-modules) 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.

```PowerShell
$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 '' -BicepRegistryName '' -BicepRegistryRgName ''
} -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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.