Skip to content

Commit b691cca

Browse files
setting cipipelineId to parent ci-pipelines id for linked ci's (#4215)
1 parent 87fad1d commit b691cca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/dockerRegistry/DockerRegistryIpsConfigService.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,11 @@ func (impl DockerRegistryIpsConfigServiceImpl) getDockerRegistryIdForCiPipeline(
163163

164164
if ciPipeline.IsDockerConfigOverridden {
165165
//set dockerRegistryId value with the DockerRegistryId of the overridden dockerRegistry
166-
ciTemplateOverride, err := impl.ciTemplateOverrideRepository.FindByCiPipelineId(ciPipelineId)
166+
ciPipId := ciPipelineId
167+
if ciPipeline.ParentCiPipeline != 0 {
168+
ciPipId = ciPipeline.ParentCiPipeline
169+
}
170+
ciTemplateOverride, err := impl.ciTemplateOverrideRepository.FindByCiPipelineId(ciPipId)
167171
if err != nil {
168172
impl.logger.Errorw("error in getting ciTemplateOverride by ciPipelineId", "ciPipelineId", ciPipelineId, "error", err)
169173
return nil, err

0 commit comments

Comments
 (0)