From dd73e2979cec61ae3ab137be8815f85d25aa3cfc Mon Sep 17 00:00:00 2001 From: royalhuang Date: Thu, 26 Oct 2023 20:46:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?bug:=20stage=E5=AE=A1=E6=A0=B8=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E5=85=BC=E5=AE=B9=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86?= =?UTF-8?q?=20#9611?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tencent/devops/common/pipeline/option/StageControlOption.kt | 2 ++ .../devops/process/engine/extend/DefaultModelCheckPlugin.kt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/ci/core/common/common-pipeline/src/main/kotlin/com/tencent/devops/common/pipeline/option/StageControlOption.kt b/src/backend/ci/core/common/common-pipeline/src/main/kotlin/com/tencent/devops/common/pipeline/option/StageControlOption.kt index 425763efd25..7d2652dd206 100644 --- a/src/backend/ci/core/common/common-pipeline/src/main/kotlin/com/tencent/devops/common/pipeline/option/StageControlOption.kt +++ b/src/backend/ci/core/common/common-pipeline/src/main/kotlin/com/tencent/devops/common/pipeline/option/StageControlOption.kt @@ -44,8 +44,10 @@ data class StageControlOption( @ApiModelProperty("运行条件", required = false) val runCondition: StageRunCondition = StageRunCondition.AFTER_LAST_FINISHED, // 运行条件 @ApiModelProperty("是否人工触发", required = false) + @Deprecated("被StagePauseCheck.manualTrigger代替") val manualTrigger: Boolean? = false, @ApiModelProperty("可触发用户,支持引用变量", required = false) + @Deprecated("被StagePauseCheck.reviewGroups") var triggerUsers: List? = null, // 可触发用户,支持引用变量 @ApiModelProperty("已通过审核", required = false) var triggered: Boolean? = null, // 已通过审核 diff --git a/src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/extend/DefaultModelCheckPlugin.kt b/src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/extend/DefaultModelCheckPlugin.kt index 7de6f06e6a2..21e1274fabe 100644 --- a/src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/extend/DefaultModelCheckPlugin.kt +++ b/src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/extend/DefaultModelCheckPlugin.kt @@ -161,7 +161,7 @@ open class DefaultModelCheckPlugin constructor( } private fun Stage.checkStageReviewers() { - if (stageControlOption?.manualTrigger != true && checkIn?.manualTrigger != true) { + if (checkIn?.manualTrigger != true) { return } resetBuildOption() From 00d6d814243a735ff003df0791c9fab4b7dff6f5 Mon Sep 17 00:00:00 2001 From: royalhuang Date: Thu, 26 Oct 2023 20:49:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?bug:=20stage=E5=AE=A1=E6=A0=B8=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E5=85=BC=E5=AE=B9=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86?= =?UTF-8?q?=20#9611?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/pipeline/option/StageControlOption.kt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/backend/ci/core/common/common-pipeline/src/main/kotlin/com/tencent/devops/common/pipeline/option/StageControlOption.kt b/src/backend/ci/core/common/common-pipeline/src/main/kotlin/com/tencent/devops/common/pipeline/option/StageControlOption.kt index 7d2652dd206..2e182cf1894 100644 --- a/src/backend/ci/core/common/common-pipeline/src/main/kotlin/com/tencent/devops/common/pipeline/option/StageControlOption.kt +++ b/src/backend/ci/core/common/common-pipeline/src/main/kotlin/com/tencent/devops/common/pipeline/option/StageControlOption.kt @@ -43,22 +43,28 @@ data class StageControlOption( val enable: Boolean = true, // 是否启用该阶段 @ApiModelProperty("运行条件", required = false) val runCondition: StageRunCondition = StageRunCondition.AFTER_LAST_FINISHED, // 运行条件 + @ApiModelProperty("自定义变量", required = false) + val customVariables: List? = emptyList(), // 自定义变量 + @ApiModelProperty("自定义条件", required = false) + val customCondition: String? = null, // 自定义条件 + + // 废弃旧数据字段 @ApiModelProperty("是否人工触发", required = false) @Deprecated("被StagePauseCheck.manualTrigger代替") val manualTrigger: Boolean? = false, @ApiModelProperty("可触发用户,支持引用变量", required = false) - @Deprecated("被StagePauseCheck.reviewGroups") + @Deprecated("被StagePauseCheck.reviewGroups代替") var triggerUsers: List? = null, // 可触发用户,支持引用变量 @ApiModelProperty("已通过审核", required = false) + @Deprecated("被StagePauseCheck.status代替") var triggered: Boolean? = null, // 已通过审核 @ApiModelProperty("等待审核的超时时间", required = false) + @Deprecated("被StagePauseCheck.timeout代替") val timeout: Int? = null, // 等待审核的超时时间 - @ApiModelProperty("自定义变量", required = false) - val customVariables: List? = emptyList(), // 自定义变量 - @ApiModelProperty("自定义条件", required = false) - val customCondition: String? = null, // 自定义条件 @ApiModelProperty("审核变量", required = false) + @Deprecated("被StagePauseCheck.reviewParams代替") var reviewParams: List? = null, // 审核变量 @ApiModelProperty("审核说明", required = false) + @Deprecated("被StagePauseCheck.reviewDesc代替") var reviewDesc: String? = null // 审核说明 )