Skip to content

Commit

Permalink
feat:支持针对构建重放事件 #11232
Browse files Browse the repository at this point in the history
  • Loading branch information
hejieehe committed Dec 30, 2024
1 parent a310355 commit 29eef50
Showing 1 changed file with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 29eef50

Please sign in to comment.