前一个作业成功完成后,如何在特定时间后执行Jenkins作业? [英] how to execute Jenkins job after specific time once the previous job completed successfully?
本文介绍了前一个作业成功完成后,如何在特定时间后执行Jenkins作业?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个詹金斯工作,我想在第一个工作成功完成后(例如12小时后)触发第二个工作.我需要在一定时间后一次执行两个詹金斯工作,一次又一次基于成功完成第一份工作
I have two jenkins jobs , I want to trigger the second job after the successful completion of the first job say after 12 hours of time.I need to execute 2 Jenkins jobs after certain time one after the other based on successful completion of first job
推荐答案
您可以如下组合使用安静期和构建后操作.
You can use combination of Quiet Period and Post build action as follows.
假设您要在作业A延迟1分钟后触发作业B.
Suppose You want to trigger Job B after Job A is done with delay of 1 minute.
然后在您的工作B中:
- 转到
General
标签 - 单击
ADVANCED
按钮 - 选中
Quiet Period
并输入60
(= 1分钟) - 保存
- Go to
General
tab - Click on
ADVANCED
button - Check
Quiet Period
and enter60
(= 1 minute) - Save
在您的职位A中: 1.去发布构建动作 2.选择构建其他项目
In you Job A: 1. Go to post build Action 2. Select Build other project
- 在
Project to build
中输入作业B,然后选择Trigger only if build is stable
- 保存
- Enter Job B in
Project to build
and selectTrigger only if build is stable
- Save
这篇关于前一个作业成功完成后,如何在特定时间后执行Jenkins作业?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文