Skip to content

Commit

Permalink
feat:支持针对构建重放事件 #11232
Browse files Browse the repository at this point in the history
  • Loading branch information
hejieehe committed Dec 27, 2024
1 parent 198dda3 commit a310355
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ object ProcessMessageCode {
const val ERROR_PIPELINE_BUILD_START_PARAM_NO_EMPTY = "2101254" // 构建启动参数如果必填,不能为空
const val ERROR_REPEATEDLY_START_VM = "2101255" // 重复启动构建机,当前构建机的状态为:{0}
const val ERROR_PIPELINE_VARIABLES_OUT_OF_LENGTH = "2101256" // 流水线启动参数{0}超出4000长度限制
const val ERROR_WEBHOOK_EVENT_NOT_FOUND = "2101258" // webhook 触发记录不存在

const val BK_SUCCESSFULLY_DISTRIBUTED = "bkSuccessfullyDistributed" // 跨项目构件分发成功,共分发了{0}个文件
const val BK_SUCCESSFULLY_FAILED = "bkSuccessfullyFailed" // 跨项目构件分发失败,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -695,13 +695,4 @@ class PipelineTriggerEventDao {
}
}
}

fun getEventIdByBuildId(dslContext: DSLContext, projectId: String, buildId: String): Long? {
return with(T_PIPELINE_TRIGGER_DETAIL) {
dslContext.select(EVENT_ID)
.from(this)
.where(PROJECT_ID.eq(projectId).and(BUILD_ID.eq(buildId)))
.fetchOne()?.value1()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -452,27 +452,6 @@ class PipelineTriggerEventService @Autowired constructor(
)
}

fun replayByBuild(
userId: String,
projectId: String,
pipelineId: String,
buildId: String
) {
val eventId = pipelineTriggerEventDao.getEventIdByBuildId(
dslContext = dslContext,
projectId = projectId,
buildId = buildId
) ?: throw ErrorCodeException(
errorCode = ProcessMessageCode.ERROR_WEBHOOK_EVENT_NOT_FOUND
)
replayAll(
userId = userId,
projectId = projectId,
eventId = eventId,
pipelineId = pipelineId
)
}

/**
* 获取国际化构建事件描述
*/
Expand Down
1 change: 0 additions & 1 deletion support-files/i18n/process/message_en_US.properties
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@
2101254=Parameter {0} is required and cannot be empty
2101255=Start the build machine repeatedly. The current status of the build machine is: {0}
2101256=pipeline build parameter {0} value exceeds 4000 length limit
2101258=Webhook trigger event does not exist

ATOM_POST_EXECUTE_TIP=###Tip:this is the post-action hooked by [step{0}]{1}###
# 公共变量
Expand Down
1 change: 0 additions & 1 deletion support-files/i18n/process/message_zh_CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@
2101254=构建入参[{0}]必填,不能为空
2101255=重复启动构建机,当前构建机的状态为:{0}
2101256=流水线变量{0}值超出4000长度限制
2101258=Webhook触发记录不存在
ATOM_POST_EXECUTE_TIP=###Tip:this is the post-action hooked by [step{0}]{1}###
ci.build-no=构建号,开启推荐版本号时有效
Expand Down

0 comments on commit a310355

Please sign in to comment.