From e70139bf057416fa60162fd7f4498d0805055ec1 Mon Sep 17 00:00:00 2001 From: greysonfang Date: Wed, 11 Dec 2024 12:13:25 +0800 Subject: [PATCH] =?UTF-8?q?bug=EF=BC=9A=E6=9B=B4=E6=96=B0=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=AE=9E=E4=BE=8B=E5=AF=BC=E8=87=B4=20=E6=B5=81?= =?UTF-8?q?=E6=B0=B4=E7=BA=BF=E6=A8=A1=E5=9E=8B=E4=B8=A2=E5=A4=B1=E7=88=B6?= =?UTF-8?q?=E6=A8=A1=E6=9D=BFID=E9=97=AE=E9=A2=98=20#11309?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../process/service/PipelineInfoFacadeService.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/service/PipelineInfoFacadeService.kt b/src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/service/PipelineInfoFacadeService.kt index 1f6986a62fa..a2884f87311 100644 --- a/src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/service/PipelineInfoFacadeService.kt +++ b/src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/service/PipelineInfoFacadeService.kt @@ -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,