有没有办法限制 Hudson CI 作业仅在一天中的特定时间运行?
Hudson CI 中是否有插件或某些配置使作业不会在一天中的特定时间运行?我正在考虑这样的工作:
如果不在下午 5 点之后和上午 9 点之前运行作业 A 进行版本控制更改,
谢谢!
is there a plugin or some configuration in Hudson CI where the job will not run during a certain time of day? I was thinking of a job like:
Run job A on version control change if not after 5pm and before 9am
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许您可以设置一个全局属性,根据时间设置为开/关,然后配置构建以使用该全局属性。
但最好的方法可能是将 scm 轮询设置为不在一天中所需的时间进行轮询。然后没有发现任何更改,也没有触发构建;-)
Maybe you could set up a global property that gets set to on/off depending on time and you configure the builds to use that global property.
But the best way would probably to set up the scm polling to just not poll at the desired time of day. Then no changes are found and no build is triggered ;-)
我们在 Jenkins 实例中运行自动化测试。当这些在某些环境中运行时,我们会禁用对相关环境的部署作业。这是使用 Jenkins CLI 完成的。 https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI
我打赌你可以做同样的事情,但在工作中使用“定期构建”功能。
We run automated tests in our Jenkins instance. When these are being run on certain environments, we disable the deploy job to the involved environments. This is done using Jenkins CLI. https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI
I bet you could do the same thing but instead use the "Build periodically" function in the job.