Skip to content

Commit 80c7dd5

Browse files
change ci normal to webhook fix (#6626)
1 parent 0404234 commit 80c7dd5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/pipeline/DeploymentPipelineConfigService.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,10 @@ func (impl *CdPipelineConfigServiceImpl) CreateCdPipelines(pipelineCreateRequest
494494
}
495495

496496
for _, pipeline := range pipelineCreateRequest.Pipelines {
497+
// skip creation of pipeline if envId is not set
498+
if pipeline.EnvironmentId <= 0 || pipeline.IsSwitchCiPipelineRequest() {
499+
continue
500+
}
497501
env, err := impl.environmentRepository.FindById(pipeline.EnvironmentId)
498502
if err != nil {
499503
impl.logger.Errorw("error in fetching env by id", "envId", pipeline.EnvironmentId, "err", err)

0 commit comments

Comments
 (0)