From 29eef50924e85883f38cb5eebac8ac772188f7d5 Mon Sep 17 00:00:00 2001 From: hejieehe <904696180@qq.com> Date: Mon, 30 Dec 2024 10:28:44 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=94=AF=E6=8C=81=E9=92=88?= =?UTF-8?q?=E5=AF=B9=E6=9E=84=E5=BB=BA=E9=87=8D=E6=94=BE=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=20#11232?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../builds/PipelineBuildFacadeService.kt | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/service/builds/PipelineBuildFacadeService.kt b/src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/service/builds/PipelineBuildFacadeService.kt index f8559d2b321..b04e19d48ed 100644 --- a/src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/service/builds/PipelineBuildFacadeService.kt +++ b/src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/service/builds/PipelineBuildFacadeService.kt @@ -2711,11 +2711,24 @@ class PipelineBuildFacadeService( logger.info("build is not finished, buildId: $buildId") return } - buildRestartPipeline( + // 按原有的启动参数组装启动参数 + val startParameters = buildInfo.buildParameters?.associate { + it.key to it.value.toString() + }?.toMutableMap() ?: mutableMapOf() + val startType = StartType.toStartType(buildInfo.trigger) + // 非webhook触发 + if (startType != StartType.WEB_HOOK) return + webhookBuildParameterService.getBuildParameters(buildId = buildInfo.buildId)?.forEach { param -> + startParameters[param.key] = param.value.toString() + } + webhookTriggerPipelineBuild( + userId = buildInfo.startUser, projectId = projectId, pipelineId = pipelineId, - buildInfo = buildInfo - ) + parameters = startParameters, + checkPermission = false, + startType = startType + )!! } private fun buildRestartPipeline(