Skip to content

Commit

Permalink
bug:更新模板实例导致 流水线模型丢失父模板ID问题 #11309
Browse files Browse the repository at this point in the history
  • Loading branch information
fcfang123 committed Jan 8, 2025
1 parent 4ab15b9 commit e70139b
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,18 @@ class PipelineInfoFacadeService @Autowired constructor(
)
modelCheckPlugin.beforeDeleteElementInExistsModel(existModel, model, param)
}
val templateId = model.templateId

if (templateId != null) {
// 如果是根据模板创建的流水线需为model设置srcTemplateId
model.srcTemplateId = templateDao.getSrcTemplateId(
dslContext = dslContext,
projectId = projectId,
templateId = templateId,
type = TemplateType.CONSTRAINT.name
)
}

val deployResult = pipelineRepositoryService.deployPipeline(
model = model,
projectId = projectId,
Expand Down

0 comments on commit e70139b

Please sign in to comment.