jenkins - Jenkins如何将cron字符串作为参数传递
问题描述
是否可以将参数作为字符串传递,如下所示?
properties([
cronStr = "/3 * * * *"
pipelineTriggers([cron(cronStr)]),
])
解决方案
谢谢@KB,以下对我有用。变量范围的问题。
def cronStr = "/3 * * * *"
properties([
pipelineTriggers([cron(cronStr)]),
])
推荐阅读
- python - 使用 Python 将文件名保存在 txt 文件中
- django - Django - 访问模板中的相关对象
- scrapy - 如何在 scrapy 中使用静态类型?
- php - 如何获得 2 个 ID 和 1 个行名
- flutter - 为什么 AnimationController 需要 vsync?
- static-site - 为什么 Pelican 忽略 STATIC_PATHS?
- bash - 命令 basename 在 find 命令中不起作用
- python - 尝试减去两个值时,Pandas 上的 For 循环返回所有值的 NaN?
- python - 为什么这个递归二等分python代码不起作用
- javascript - 如何在指令中获取 ng-model 值