Skip to content

Commit

Permalink
丰富流水线-stage准入的审核功能,支持配置角色或用户组作为审核人 #10689
Browse files Browse the repository at this point in the history
  • Loading branch information
yongyiduan committed Sep 24, 2024
1 parent f2cdd96 commit 04cd21f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ object ProcessMessageCode {
const val BK_PREVIOUS_STAGE_SUCCESS = "bkPreviousStageSuccess" // [上游 Stage 成功时](Previous Stage Success):
const val BK_UNEXECUTE_TASK = "bkUnexecuteTask" // 终止构建,跳过(UnExecute Task)
const val BK_CONDITION_INVALID = "bkConditionInvalid" // 执行条件判断失败(Condition Invalid)
const val BK_STAGE_REVIEW_EMPTY_REVIEWER = "bkStageReviewEmptyViewer" // 由于无审核人,被系统自动驳回

// [SystemLog]收到终止指令(UnExecute PostAction Task)
const val BK_UNEXECUTE_POSTACTION_TASK = "bkUnexecutePostactionTask"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ import com.tencent.devops.common.pipeline.enums.BuildStatus
import com.tencent.devops.common.pipeline.enums.ManualReviewAction
import com.tencent.devops.common.pipeline.pojo.StagePauseCheck
import com.tencent.devops.common.pipeline.pojo.StageReviewRequest
import com.tencent.devops.common.web.utils.I18nUtil
import com.tencent.devops.common.websocket.enum.RefreshType
import com.tencent.devops.process.constant.ProcessMessageCode.BK_STAGE_REVIEW_EMPTY_REVIEWER
import com.tencent.devops.process.engine.common.BS_MANUAL_START_STAGE
import com.tencent.devops.process.engine.common.BS_QUALITY_ABORT_STAGE
import com.tencent.devops.process.engine.common.BS_QUALITY_PASS_STAGE
Expand Down Expand Up @@ -609,7 +611,10 @@ class PipelineStageService @Autowired constructor(
reviewRequest = StageReviewRequest(
reviewParams = listOf(),
id = group.id,
suggest = "CANCEL with empty reviewer"
suggest = I18nUtil.getCodeLanMessage(
messageCode = BK_STAGE_REVIEW_EMPTY_REVIEWER,
language = I18nUtil.getDefaultLocaleLanguage()
)
),
debug = debug
)
Expand Down
1 change: 1 addition & 0 deletions support-files/i18n/process/message_en_US.properties
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ bkMergeYamlUpdateFileTitle=modify pipeline {0}
bkBuildQueueWaitingForConcurrency=Concurrency Mode: {0}, concurrency for group[{1}] and queue size: {2}, now waiting for {3}
bkBuildQueueWaiting=Concurrency Mode: {0}, queue size: {1}
bkBuildCancelByConcurrency=Canceled by concurrency group[{0}] because of a higher priority waiting request {1}
bkStageReviewEmptyViewer=Because there is no reviewer, it was automatically rejected by the system

operationLogType.NORMAL_SAVE_OPERATION=Normal save operation
operationLogType.CREATE_PIPELINE_AND_DRAFT=Created draft
Expand Down
1 change: 1 addition & 0 deletions support-files/i18n/process/message_zh_CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ bkMergeYamlUpdateFileTitle=[{0}]修改流水线[{1}]
bkBuildQueueWaitingForConcurrency=构建的并发模式为:{0},正在等待并发组[{1}]的[{2}]个构建执行完成,当前正在执行构建{3}
bkBuildQueueWaiting=构建的并发模式为:{0},正在等待[{1}]个构建执行完成
bkBuildCancelByConcurrency=构建将被并发组[{0}]中优先级更高的构建{1}取消
bkStageReviewEmptyViewer=由于无审核人,被系统自动驳回
operationLogType.NORMAL_SAVE_OPERATION=普通保存操作
operationLogType.CREATE_PIPELINE_AND_DRAFT=创建了草稿
Expand Down

0 comments on commit 04cd21f

Please sign in to comment.