From e80550544fa9baf02474ee8d71eef9d879a6c151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?yongyiduan=28=E6=AE=B5=E6=B0=B8=E5=84=84=29?= Date: Fri, 25 Oct 2024 12:17:28 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=B5=81=E6=B0=B4=E7=BA=BF/Job?= =?UTF-8?q?=E5=B9=B6=E5=8F=91=E5=92=8C=E6=8E=92=E9=98=9F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=90=BD=E5=9C=B0=20#10997?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tencent/devops/dispatch/service/ThirdPartyAgentService.kt | 4 +++- .../engine/control/command/container/impl/ContainerCmdLoop.kt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/backend/ci/core/dispatch/biz-dispatch/src/main/kotlin/com/tencent/devops/dispatch/service/ThirdPartyAgentService.kt b/src/backend/ci/core/dispatch/biz-dispatch/src/main/kotlin/com/tencent/devops/dispatch/service/ThirdPartyAgentService.kt index 653f9821723..68729c1547a 100644 --- a/src/backend/ci/core/dispatch/biz-dispatch/src/main/kotlin/com/tencent/devops/dispatch/service/ThirdPartyAgentService.kt +++ b/src/backend/ci/core/dispatch/biz-dispatch/src/main/kotlin/com/tencent/devops/dispatch/service/ThirdPartyAgentService.kt @@ -49,6 +49,7 @@ import com.tencent.devops.common.event.enums.ActionType import com.tencent.devops.common.event.enums.PipelineBuildStatusBroadCastEventType import com.tencent.devops.common.event.pojo.pipeline.PipelineBuildStatusBroadCastEvent import com.tencent.devops.common.notify.enums.NotifyType +import com.tencent.devops.common.pipeline.enums.BuildStatus import com.tencent.devops.common.pipeline.type.agent.ThirdPartyAgentDockerInfoDispatch import com.tencent.devops.common.redis.RedisOperation import com.tencent.devops.common.service.utils.HomeHostUtil @@ -254,7 +255,8 @@ class ThirdPartyAgentService @Autowired constructor( buildId = build.buildId, taskId = null, actionType = ActionType.START, containerHashId = build.containerHashId, jobId = build.jobId, stageId = null, stepId = null, atomCode = null, executeCount = build.executeCount, - buildStatus = null, type = PipelineBuildStatusBroadCastEventType.BUILD_AGENT_START, + buildStatus = BuildStatus.RUNNING.name, + type = PipelineBuildStatusBroadCastEventType.BUILD_AGENT_START, labels = mapOf( "agentId" to build.agentId, "envHashId" to (build.envId?.let { HashUtil.encodeLongId(it) } ?: ""), diff --git a/src/backend/ci/core/process/biz-engine/src/main/kotlin/com/tencent/devops/process/engine/control/command/container/impl/ContainerCmdLoop.kt b/src/backend/ci/core/process/biz-engine/src/main/kotlin/com/tencent/devops/process/engine/control/command/container/impl/ContainerCmdLoop.kt index 930a4e41259..10d1885ae03 100644 --- a/src/backend/ci/core/process/biz-engine/src/main/kotlin/com/tencent/devops/process/engine/control/command/container/impl/ContainerCmdLoop.kt +++ b/src/backend/ci/core/process/biz-engine/src/main/kotlin/com/tencent/devops/process/engine/control/command/container/impl/ContainerCmdLoop.kt @@ -31,6 +31,7 @@ import com.tencent.devops.common.event.dispatcher.pipeline.PipelineEventDispatch import com.tencent.devops.common.event.enums.ActionType import com.tencent.devops.common.event.enums.PipelineBuildStatusBroadCastEventType import com.tencent.devops.common.event.pojo.pipeline.PipelineBuildStatusBroadCastEvent +import com.tencent.devops.common.pipeline.enums.BuildStatus import com.tencent.devops.process.engine.control.command.CmdFlowState import com.tencent.devops.process.engine.control.command.container.ContainerCmd import com.tencent.devops.process.engine.control.command.container.ContainerContext @@ -67,7 +68,8 @@ class ContainerCmdLoop( buildId = buildId, taskId = null, actionType = ActionType.START, containerHashId = containerHashId, jobId = jobId, stageId = null, stepId = null, atomCode = null, executeCount = executeCount, - buildStatus = null, type = PipelineBuildStatusBroadCastEventType.BUILD_JOB_QUEUE, + buildStatus = BuildStatus.QUEUE.name, + type = PipelineBuildStatusBroadCastEventType.BUILD_JOB_QUEUE, labels = mapOf( "latestSummary" to commandContext.latestSummary, "mutexGroup" to (controlOption.mutexGroup?.runtimeMutexGroup ?: ""),