[Bug Report]: Publishing of resources with '--' in name fails (gracefully)
- Dominant language
- PowerShell
- Stars
- 737
- Forks
- 436
- Avg merge
- 10d 7h
- Merged PRs (30d)
- 1
Description
### Describe the bug
Modules with a name containing '--' seems to be failing the publishing step as the ACR repos do not allow for consecutive `'.', '_' or '-'` characters.
From: https://github.com/Azure/ResourceModules/actions/runs/5811199687/job/15754407806#step:4:610
```
- [digital-twins/digital-twins-instances/endpoints--service-bus] [latest]
VERBOSE: Invoke task with
VERBOSE: {
"TemplateFilePath": "/home/runner/work/ResourceModules/ResourceModules/modules/digital-twins/digital-twins-instances/endpoints--service-bus/main.bicep",
"BicepRegistryRgName": "artifacts-rg",
"BicepRegistryRgLocation": "West Europe",
"ModuleVersion": "latest",
"BicepRegistryName": "adpsxxazacrx001"
}
VERBOSE: Performing the operation "Publish" on target "Private bicep registry entry [bicep/modules/digital-twins.digital-twins-instances.endpoints--service-bus] version [latest] to registry [adpsxxazacrx001]".
The specified OCI artifact reference "br:adpsxxazacrx001.azurecr.io/bicep/modules/digital-twins.digital-twins-instances.endpoints--service-bus:latest" is not valid. The module path segment "digital-twins.digital-twins-instances.endpoints--service-bus" is not valid. Each module name path segment must be a lowercase alphanumeric string optionally separated by a ".", "_" , or "-".
VERBOSE: Publish complete
```
2 tasks:
- [ ] Fix the publishing logic to fail the pipeline if the publishing fails.
- [ ] Look at how to handle naming of resources when published to ACR (atleast). Other resources with the same issue:
- [ ] digital-twins\digital-twins-instances\ [pipeline](https://github.com/Azure/ResourceModules/actions/runs/5811199687/job/15754407806#step:4:433)
- [ ] endpoints--event-grid
- [ ] endpoints--event-hub
- [ ] endpoints--service-bus
- [ ] web\hosting-environments\ [pipeline](https://github.com/Azure/ResourceModules/actions/runs/5811199533/job/15763195267#step:4:433)
- [ ] configurations--customdnssuffix
- [ ] configurations--networking
- [ ] web\sites\ [pipeline](https://github.com/Azure/ResourceModules/actions/runs/5811199567/job/15754702633#step:4:433)
- [ ] config--appsettings
- [ ] config--authsettingsv2
- [ ] slots\config--appsettings
- [ ] slots\config--authsettingsv2
### To reproduce
Review the Digital Twins pipeline
### Code snippet
_No response_
### Relevant log output
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.