Skip to content

Commit

Permalink
Merge pull request TencentBlueKing#10441 from hejieehe/feat_10436
Browse files Browse the repository at this point in the history
feat:补全内置变量列表 TencentBlueKing#10436
  • Loading branch information
bkci-bot authored May 31, 2024
2 parents a853527 + 9b7f8a6 commit 80d4270
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,7 @@ object PipelineBuildParamKey {
const val CI_PIPELINE_ID = "ci.pipeline_id"
const val CI_BUILD_ID = "ci.build_id"
const val CI_PIPELINE_NAME = "ci.pipeline_name"
const val CI_WORKSPACE = "ci.workspace"
const val CI_FAILED_TASKNAMES = "ci.failed_tasknames"
const val CI_FAILED_TASKS = "ci.failed_tasks"
}
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ object PipelineVarUtil {
"ci.repo_type" to BK_REPO_WEBHOOK_REPO_TYPE,
"ci.branch" to BK_REPO_GIT_WEBHOOK_BRANCH,
"ci.create_ref" to BK_REPO_GITHUB_WEBHOOK_CREATE_REF_NAME,
"ci.create_type" to BK_REPO_GITHUB_WEBHOOK_CREATE_REF_TYPE
"ci.create_type" to BK_REPO_GITHUB_WEBHOOK_CREATE_REF_TYPE,
"ci.failed_tasks" to BK_CI_BUILD_FAIL_TASKS,
"ci.failed_tasknames" to BK_CI_BUILD_FAIL_TASKNAMES
)

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ import com.tencent.devops.process.constant.PipelineBuildParamKey.CI_CREATE_REF_T
import com.tencent.devops.process.constant.PipelineBuildParamKey.CI_CREATE_TIME
import com.tencent.devops.process.constant.PipelineBuildParamKey.CI_EVENT
import com.tencent.devops.process.constant.PipelineBuildParamKey.CI_EVENT_URL
import com.tencent.devops.process.constant.PipelineBuildParamKey.CI_FAILED_TASKNAMES
import com.tencent.devops.process.constant.PipelineBuildParamKey.CI_FAILED_TASKS
import com.tencent.devops.process.constant.PipelineBuildParamKey.CI_HEAD_REF
import com.tencent.devops.process.constant.PipelineBuildParamKey.CI_HEAD_REPO_URL
import com.tencent.devops.process.constant.PipelineBuildParamKey.CI_ISSUE_DESCRIPTION
Expand Down Expand Up @@ -103,6 +105,7 @@ import com.tencent.devops.process.constant.PipelineBuildParamKey.CI_REVIEW_TYPE
import com.tencent.devops.process.constant.PipelineBuildParamKey.CI_SHA
import com.tencent.devops.process.constant.PipelineBuildParamKey.CI_SHA_SHORT
import com.tencent.devops.process.constant.PipelineBuildParamKey.CI_TAG_FROM
import com.tencent.devops.process.constant.PipelineBuildParamKey.CI_WORKSPACE

@SuppressWarnings("TooManyFunctions")
object TriggerBuildParamUtils {
Expand Down Expand Up @@ -144,7 +147,10 @@ object TriggerBuildParamUtils {
CI_PIPELINE_CREATOR,
CI_PIPELINE_MODIFIER,
CI_PIPELINE_VERSION,
CI_BUILD_START_TYPE
CI_BUILD_START_TYPE,
CI_WORKSPACE,
CI_FAILED_TASKNAMES,
CI_FAILED_TASKS
).sortedBy {
it
}.map {
Expand Down
3 changes: 3 additions & 0 deletions support-files/i18n/process/message_en_US.properties
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ ci.pipeline_name=Name for the pipeline.
ci.actor=The username of the user that triggered the pipeline run
ci.project_id=Project ID, unique identifier of the project.
ci.build_start_type=Build start method, Possible values are MANUAL, TIME_TRIGGER, WEB_HOOK, SERVICE, PIPELINE or REMOTE
ci.workspace=The workspace of current job
ci.failed_tasknames=All failed tasks in the pipeline, value format: TASK alias, TASK alias, TASK alias
ci.failed_tasks=All failed tasks in the pipeline, value format: [STAGE alias][JOB alias]TASK alias. If there are multiple concurrent JOB failures, separate them with a newline (\\n)
CONST_PROCESS_VIEW_LABEL_ALL=All assembly lines
CONST_PROCESS_VIEW_LABEL_FAVORITE=My collection
CONST_PROCESS_VIEW_LABEL_MY=My assembly line
Expand Down
3 changes: 3 additions & 0 deletions support-files/i18n/process/message_zh_CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,9 @@ ci.pipeline_name=流水线名称
ci.project_id=项目ID,项目的唯一标识
ci.build_start_type=构建启动方式可能的值有 MANUAL、TIME_TRIGGER、WEB_HOOK、SERVICE、PIPELINE或者REMOTE
ci.actor=当前构建的启动人
ci.workspace=当前 Job 的工作空间
ci.failed_tasknames=流水线执行失败的所有TASK,值格式:TASK别名,TASK别名,TASK别名
ci.failed_tasks=流水线执行失败的所有TASK,值格式:[STAGE别名][JOB别名]TASK别名。若有多个并发JOB失败,使用换行(\\n)分隔
BUILD_NUM_RULE_STYLE=BUILD_NUM_RULE_STYLE自定义构建号规则只能由【大小写字母、数字、空格、-、_、.、:、{、}、(、)、"、+、?、$】字符组成,长度在1-256之间
CONST_PROCESS_VIEW_LABEL_ALL=全部流水线
CONST_PROCESS_VIEW_LABEL_FAVORITE=我的收藏
Expand Down

0 comments on commit 80d4270

Please sign in to comment.