[英]Jenkins: Jobs triggered to build from GitHub web-hook run only on master node
The initial idea was to trigger a specific build on a specific node (slave), after merging changes to master branch on GitHub.最初的想法是在将更改合并到 GitHub 上的 master 分支后,在特定节点(从属节点)上触发特定构建。
Configuration:配置:
Steps done:完成的步骤:
As expected: The job runns properly.正如预期的那样:作业运行正常。
As expected: I can ping the Jenkins server successfully.正如预期的那样:我可以成功 ping Jenkins 服务器。
Actual results: The build is triggered but only on the Master node.实际结果:构建被触发,但仅在主节点上触发。
I marked as offline the Master node as to force the triggered job to be executed on the new slave.我将主节点标记为离线,以强制在新从节点上执行触发的作业。 Actual results: Nothing happens.
实际结果:没有任何反应。
I enabled the Master node and tried to trigger the job again.我启用了主节点并尝试再次触发作业。 Actual results: Nothing happens.
实际结果:没有任何反应。
I have tail-ed the jenkins.log file to see what happens, and the 'poked build' action is recorded.我跟踪 jenkins.log 文件以查看发生了什么,并记录了“戳构建”操作。 After this, probably it waits to execute the build but this never happens.
在此之后,它可能会等待执行构建,但这从未发生过。 At the end the 'Periodic background build discarder' is started.
最后,“定期后台构建丢弃程序”启动。
2020-03-24 21:35:11.733+0000 [id=16] INFO o.j.p.g.w.s.DefaultPushGHEventSubscriber#onEvent: Received PushEvent for https://github.com/some/some_project from [someip] ⇒ http://blah.ngrok.io:8080/github-webhook/
2020-03-24 21:35:11.734+0000 [id=16] INFO o.j.p.g.w.s.DefaultPushGHEventSubscriber$1#run: Poked simple_build
2020-03-24 21:39:07.386+0000 [id=206] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started Periodic background build discarder
2020-03-24 21:39:07.403+0000 [id=206] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished Periodic back
Am I missing something?我错过了什么吗?
Is the web-hook trigger build action restricted to execute only on the Master node? web-hook 触发器构建操作是否仅限于在主节点上执行?
I have managed to find a solution to the problem.我设法找到了解决问题的方法。 Now builds are triggered and run on the node that was set in the build configuration screen.
现在构建被触发并在构建配置屏幕中设置的节点上运行。
What I have done is to set the master node to be used only when it is needed.我所做的是将主节点设置为仅在需要时使用。
To do this you need to:为此,您需要:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.