how to trigger the scheduled job which has parameters

放肆的年华 提交于 2021-01-29 12:31:06

问题


How to schedule the parameterized jenkins job?

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.

My questions are:

  1. How does the parent job takes the parameters when it is triggered?
  2. Does it take the default choice or do i need a script to give the parameters?
  3. How to configure if i want to skip any one of the child job?

回答1:


Use the Parameterized Scheduler Plugin

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) I don't think it honors a default, I have not seen that in the docs. Let us know if you find something.

3) Via the parameters?



来源:https://stackoverflow.com/questions/56296420/how-to-trigger-the-scheduled-job-which-has-parameters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!