如何在 Jenkins/Hudson 作业中手动触发 Mercurial 的拉取?
我已经在 Jenkins 中设置了一项工作,使用 Mercurial 插件。一旦我推送到存储库,这就很有效。我可以手动触发作业的构建,但无法触发作为轮询一部分发生的 hg pull/update,这意味着我必须等待最多 60 秒才能开始进行新更改的构建。有时我会推动一些我知道会影响并可能破坏系统构建的更改,并希望获得更快的反馈。在手动构建之前拉取/更新的最佳方法是什么?
I've set up a job in Jenkins that polls my Mercurial repository, using the Mercurial plugin. This works well once I push to the repository. I can trigger a build of the job manually, but I can't trigger the hg pull/update that happens as part of the poll, which means I have to wait up to 60 seconds for the build to start with my new changes. Sometimes I'm pushing changes that I know will affect and possibly break the system build and want faster feedback. What's the best way to pull/update before a manual build?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你的静默期确定了吗?您可以将其更改为 0 以立即触发 builde (http://jenkins-ci.org/content/quiet-period-feature)
另外,您可以有两份工作,一份是您现在拥有的,另一份是仅民意调查以寻求改变。当“轮询器”看到更改时,它可能会触发您当前的作业(“项目后构建”)。
Is your quiet period set? You can change that to 0 to trigger builde immediately (http://jenkins-ci.org/content/quiet-period-feature)
Also, you could have two jobs, one that you have right now, and a second one that only polls for changes. The "poller" could trigger your current job when it sees changes ("Build after project").
如果您在更新/拉取 hg 时遇到问题,我会建议您。您可以做的是使用执行 shell 来更新您的构建,因为您手动关闭了构建。然后你可以定期构建作业;因此,无论您设置的构建周期如何,它都会导致您的拉力发生。您不必担心轮询您的 SCM。
I would suggest if your having issues with update/pull with hg. what you can do is is the use the execute shell to update your build since your shooting off your build manaually. Then you can have the job build periodically; so it will cause your pull to happen whatever you set you build period to be. You wont have to worry about polling your SCM.
看来我错了。当我最初测试这个时,我一定错过了日志中的某些内容,或者也许我在推送到服务器之前点击了手动构建链接。 Jenkins 似乎在每次构建开始时执行
hg传入
然后hg unbundle
然后hg update
,即使构建是手动触发的,这也是如此这正是我想要的。It seems that I am wrong. I must have missed something in the log when I was initially testing this, or maybe I hit the manual build link before the push went through to the server. Jenkins seems to perform a
hg incoming
thenhg unbundle
thenhg update
at the start of each build, even when the build is triggered manually, which is exactly what I wanted.