Skip to content

Commit

Permalink
Merge pull request #11310 from fcfang123/issue-11309
Browse files Browse the repository at this point in the history
bug:更新模板实例导致 流水线模型丢失父模板ID问题 #11309
  • Loading branch information
bkci-bot authored Jan 9, 2025
2 parents 2234aac + e70139b commit b71500e
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 b71500e

Please sign in to comment.