Azure / Azure/ResourceModules

[Bug Report]: ADO Pipeline publishing to private registry not working

Open
#3,105 1 comment 0 reactions 0 assignees View on GitHub
[cat] publishing bug
Dominant language
PowerShell
Stars
737
Forks
436
Avg merge
10d 7h
Merged PRs (30d)
1

Description

### Describe the bug

While onboarding the pipelines for the modules in Azure DevOps I noticed that the first pipeline completed had deployed the container registry resource, and had published the module to the registry.
The second module did not publish to the registry, nor did any subsequent modules.

Expected behavior would have been that all pipelines publish the modules to the registry.

### To reproduce

In Azure DevOps configure the environment, add 2 or more module pipelines.

Run 1 of the module pipelines and confirm the registry is deployed and the module for that pipeline is published in the registry.
Run another module pipeline and confirm the module for that pipeline is not published in the registry.

### Code snippet

_No response_

### Relevant log output

```Shell
partial log for first module pipeline run (resourceGroups):

VERBOSE: Gathering modified files from the pull request
VERBOSE: Looking for modified files under: [Microsoft.Resources/resourceGroups]
VERBOSE: No template file found in the modified module.
VERBOSE: Modified modules found: [0]
VERBOSE: No modules with changes found to publish.
VERBOSE: Invoke Get-ModulesMissingFromPrivateBicepRegistry with
VERBOSE: {
"TemplateFilePath": "/home/vsts/work/1/s/modules/Microsoft.Resources/resourceGroups/deploy.bicep",
"PublishLatest": true,
"BicepRegistryName": "nubcrcarmleuw",
"BicepRegistryRgName": "artifacts-rg"
}

VERBOSE: Missing module [/home/vsts/work/1/s/modules/Microsoft.Resources/resourceGroups/deploy.bicep] will be considered for publishing with version(s) [0.5.0, 0.5, 0, latest]
- [Microsoft.Resources/resourceGroups] [0.5.0]
- [Microsoft.Resources/resourceGroups] [0.5]
- [Microsoft.Resources/resourceGroups] [0]
- [Microsoft.Resources/resourceGroups] [latest]

/usr/bin/az account clear
Finishing: Publish module to private bicep registry

Partial log for second module pipeline run (vaults):
VERBOSE: Gathering modified files from the pull request
VERBOSE: Looking for modified files under: [Microsoft.KeyVault/vaults]
VERBOSE: No template file found in the modified module.
VERBOSE: Modified modules found: [0]
VERBOSE: No modules with changes found to publish.
VERBOSE: Invoke Get-ModulesMissingFromPrivateBicepRegistry with
VERBOSE: {
"BicepRegistryRgName": "artifacts-rg",
"TemplateFilePath": "/home/vsts/work/1/s/modules/Microsoft.KeyVault/vaults/deploy.bicep",
"BicepRegistryName": "nubcrcarmleuw",
"PublishLatest": true
}

VERBOSE: No modules missing in the target environment
/usr/bin/az account clear
Finishing: Publish module to private bicep registry
```

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.