问题
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:
- How does the parent job takes the parameters when it is triggered?
- Does it take the default choice or do i need a script to give the parameters?
- 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