我在Jenkins A实例中运行了Jenkins Pipeline作业。在Jenkins Pipeline作业中,我只想与Jenkins B实例中的下游作业进行交谈/调用。有没有办法做到这一点?
发布于 2020-01-27 15:10:55
一种方法是将B实例的作业配置为使用Remote Access API接受远程构建。
在实例B作业配置中,启用"Trigger builds remotely (例如,from scripts)“复选框,并填写您决定的某个令牌。
然后从实例A作业调用https://<instance-B-url>/<url-path-to-job>/build?token=<your-token>,或者如果作业具有参数/buildWithParameters?token=<your-token>。你可以使用HTTP Request plugin,或者简单地在Jenkinsfile中从shell中curl它。
https://stackoverflow.com/questions/59925745
复制相似问题