首页 > 解决方案 > 我们可以在 Jenkins 作业中将构建时间作为参数传递吗?

问题描述

我在 jenkins 有一份工作,它会触发其他管道。有什么方法可以作为参数传递作业必须运行某个管道的时间?

标签: jenkinsjenkins-pipeline

解决方案


根据文档quietPeriod您可能想要探索一些参数。

* quietPeriod (optional)

Optional alternate quiet period (in seconds) before building. If unset, defaults 
to the quiet period defined by the downstream project (or finally to the system-
wide default quiet period).

Type: int

您需要计算“现在”和您希望作业运行之间的秒数。


推荐阅读