From de59384ebfa1f4dcd4e9faaa10a8f1f1b0cd67f7 Mon Sep 17 00:00:00 2001 From: sawyersong Date: Thu, 2 Sep 2021 18:26:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9E=84=E5=BB=BA=E5=B9=B6=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E9=95=9C=E5=83=8F=E6=94=AF=E6=8C=81=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E6=8E=A5=E5=85=A5=20#5032?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sawyersong --- .../com/tencent/devops/dockerhost/pojo/DockerBuildParam.kt | 4 +++- .../devops/dockerhost/services/DockerHostImageService.kt | 1 + .../devops/dockerhost/services/image/HandlerContext.kt | 3 ++- .../devops/dockerhost/services/image/ImageHandlerContext.kt | 6 ++++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/backend/ci/core/dockerhost/api-dockerhost/src/main/kotlin/com/tencent/devops/dockerhost/pojo/DockerBuildParam.kt b/src/backend/ci/core/dockerhost/api-dockerhost/src/main/kotlin/com/tencent/devops/dockerhost/pojo/DockerBuildParam.kt index 233ba7c0576..efffe13877b 100644 --- a/src/backend/ci/core/dockerhost/api-dockerhost/src/main/kotlin/com/tencent/devops/dockerhost/pojo/DockerBuildParam.kt +++ b/src/backend/ci/core/dockerhost/api-dockerhost/src/main/kotlin/com/tencent/devops/dockerhost/pojo/DockerBuildParam.kt @@ -57,5 +57,7 @@ data class DockerBuildParam( @ApiModelProperty("镜像tag列表", required = false) val imageTagList: List = emptyList(), @ApiModelProperty("pipelineTaskId", required = false) - val pipelineTaskId: String = "" + val pipelineTaskId: String = "", + @ApiModelProperty("流水线触发用户", required = false) + val userId: String = "" ) diff --git a/src/backend/ci/core/dockerhost/biz-dockerhost/src/main/kotlin/com/tencent/devops/dockerhost/services/DockerHostImageService.kt b/src/backend/ci/core/dockerhost/biz-dockerhost/src/main/kotlin/com/tencent/devops/dockerhost/services/DockerHostImageService.kt index b4a6b81aa8b..4bfe7b062b5 100644 --- a/src/backend/ci/core/dockerhost/biz-dockerhost/src/main/kotlin/com/tencent/devops/dockerhost/services/DockerHostImageService.kt +++ b/src/backend/ci/core/dockerhost/biz-dockerhost/src/main/kotlin/com/tencent/devops/dockerhost/services/DockerHostImageService.kt @@ -95,6 +95,7 @@ class DockerHostImageService( pipelineId = pipelineId, buildId = buildId, vmSeqId = vmSeqId, + userName = userName, dockerBuildParam = dockerBuildParam, dockerClient = dockerClient, pipelineTaskId = elementId, diff --git a/src/backend/ci/core/dockerhost/biz-dockerhost/src/main/kotlin/com/tencent/devops/dockerhost/services/image/HandlerContext.kt b/src/backend/ci/core/dockerhost/biz-dockerhost/src/main/kotlin/com/tencent/devops/dockerhost/services/image/HandlerContext.kt index 3df9de8c45d..909cee9280b 100644 --- a/src/backend/ci/core/dockerhost/biz-dockerhost/src/main/kotlin/com/tencent/devops/dockerhost/services/image/HandlerContext.kt +++ b/src/backend/ci/core/dockerhost/biz-dockerhost/src/main/kotlin/com/tencent/devops/dockerhost/services/image/HandlerContext.kt @@ -4,5 +4,6 @@ open class HandlerContext( open val projectId: String, open val pipelineId: String, open val buildId: String, - open val vmSeqId: String + open val vmSeqId: String, + open val userName: String ) diff --git a/src/backend/ci/core/dockerhost/biz-dockerhost/src/main/kotlin/com/tencent/devops/dockerhost/services/image/ImageHandlerContext.kt b/src/backend/ci/core/dockerhost/biz-dockerhost/src/main/kotlin/com/tencent/devops/dockerhost/services/image/ImageHandlerContext.kt index 48fd1e5615d..23b2ca5ffe9 100644 --- a/src/backend/ci/core/dockerhost/biz-dockerhost/src/main/kotlin/com/tencent/devops/dockerhost/services/image/ImageHandlerContext.kt +++ b/src/backend/ci/core/dockerhost/biz-dockerhost/src/main/kotlin/com/tencent/devops/dockerhost/services/image/ImageHandlerContext.kt @@ -13,10 +13,12 @@ data class ImageHandlerContext( override val projectId: String, override val pipelineId: String, override val buildId: String, - override val vmSeqId: String + override val vmSeqId: String, + override val userName: String ) : HandlerContext( projectId = projectId, pipelineId = pipelineId, buildId = buildId, - vmSeqId = vmSeqId + vmSeqId = vmSeqId, + userName = userName )