Skip to content

Commit

Permalink
feat:定时触发器支持设置启动变量 TencentBlueKing#10617
Browse files Browse the repository at this point in the history
  • Loading branch information
hejieehe committed Dec 3, 2024
1 parent 8296349 commit 132556e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class ElementTransfer @Autowired(required = false) constructor(
branches = element.branches,
always = (element.noScm != true).nullIfDefault(false),
enable = element.elementEnabled().nullIfDefault(true),
startParam = element.startParam
startParams = element.startParams
)
)
return@forEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ class TriggerTransfer @Autowired(required = false) constructor(
newExpression = timer.newExpression,
advanceExpression = timer.advanceExpression,
noScm = timer.always != true,
startParam = timer.startParam
startParams = timer.startParams
).checkTriggerElementEnable(timer.enable)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ data class SchedulesRule(
var newExpression: List<String>? = null,
@JsonIgnore
var advanceExpression: List<String>? = null,
val startParam: Map<String, String>? = null
@get:Schema(title = "start-params")
val startParams: Map<String, String>? = null
) {
data class Interval(
val week: List<String>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ data class TimerTriggerElement(
@get:Schema(title = "指定代码库别名", required = false)
val repoName: String? = null,
@get:Schema(title = "定时启动参数", required = false)
val startParam: Map<String,String>? = null
val startParams: Map<String,String>? = null
) : Element(name, id, status) {
companion object {
const val classType = "timerTrigger"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class TimerTriggerElementBizPlugin constructor(
branchs = element.branches?.toSet(),
noScm = element.noScm,
taskId = element.id ?: "",
startParam = element.startParam
startParam = element.startParams
)
logger.info("[$pipelineId]|$userId| Update pipeline timer|crontab=$crontabExpressions")
if (result.isNotOk()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ open class PipelineTimerUpgradeService @Autowired constructor(
pipelineId = pipelineId,
taskId = timerTriggerElement.id ?: "",
userId = lastModifyUser,
startParam = timerTriggerElement.startParam,
startParam = timerTriggerElement.startParams,
crontabExpressionJson = crontab
)
}
Expand Down Expand Up @@ -179,7 +179,7 @@ open class PipelineTimerUpgradeService @Autowired constructor(
branchs = element.branches?.toSet(),
noScm = element.noScm,
taskId = element.id ?: "",
startParam = element.startParam
startParam = element.startParams
)
}
}
Expand Down

0 comments on commit 132556e

Please sign in to comment.