如何触发具有参数的预定作业 [英] how to trigger the scheduled job which has parameters
问题描述
如何安排参数化的詹金斯工作?
How to schedule the parameterized jenkins job?
我有一个带参数的父作业,其中有6个子作业.触发父级作业时,应该依次启动子级作业.我应在周末每7小时运行一次父级作业,我将其指定为H */7 * * 6-7
.
I have a parameterized parent job which has 6 child jobs. when the parent job is triggered it should start the child jobs one after another.I should run the parent job for every 7 hours on weekend which I have given as H */7 * * 6-7
.
我的问题是:
- 父作业被触发时如何获取参数?
- 是采用默认选项还是需要脚本来提供参数?
- 如何配置是否要跳过任何一项子工作?
推荐答案
1)这是通过调度程序传递参数的示例.如果您的工作已参数化,则插件将添加一个选项"使用参数定期构建".
1) Here's an example of passing parameters via the scheduler. If your job is parameterized, the plugin will add an option "Build periodically with parameters".
H */7 * * 6-7 % Environment=development; Version=2,4,3
2)我认为它不符合默认值,我在文档中没有看到它.让我们知道您是否找到了东西.
2) I don't think it honors a default, I have not seen that in the docs. Let us know if you find something.
3)通过参数?
这篇关于如何触发具有参数的预定作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!