参数化的远程触发插件不尊重构建令牌root
我正在尝试从另一个詹金斯(a)触发一份工作(a)(b)。我已经安装了2个插件:
- 参数化的远程触发
- 构建令牌root
我的问题是,我能够使用例如curl and disken触发Jenkins(b)上的构建,这意味着构建令牌root插件正常工作,但是参数化的远程触发似乎并不尊重这一点。
我可能应该提到,我已经尝试了不同的auth选项,信任所有证书等
。 config:
日志在启用启用构建令牌root支持的情况下相同。
I'm trying to trigger a job from one Jenkins (A) on another one (B). I've installed 2 plugins:
- Parameterized Remote Trigger
- Build Token Root
My issue is, that I'm able to trigger build on Jenkins (B) using for example curl and token only, which means the Build Token Root plugin is working as expected, but Parameterized Remote Trigger seems to don't respect this.
I probably should mention that I've tried different auth options, Trust All certs, etc.
Logs are the same with and without Build Token Root support enabled.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够通过允许匿名用户进行整体阅读和工作阅读访问来实现此功能。看来这是必要的,因为参数化的远程触发插件尝试调用其他API,但仅仅是
/build
和/build withParameters
,而这些调用是失败的。有道理的是,要具有默认的阻止功能,您需要将其他API调用到民意调查,但即使设置
BlockbuilduntilComplete:false
也无法解决问题。考虑到参数化的远程触发插件清楚地表明它在文档中的构建令牌插件中“效果很好”,因此使它们一起工作并不是一件容易的事。我认为,将两者一起使用并不是一个理想的解决方案,因为有必要允许未经身份验证的用户通过UI浏览您的Jenkins实例 - 我怀疑您可以(尽管我没有尝试过)获得一个API令牌仅具有整体阅读和工作读取访问的用户,而不是授予所有匿名用户的权利,但这包括管理用户和API代币的开销,这违反了我们首先使用构建令牌插件的主要动机。
I was able to get this working by allowing Anonymous users Overall Read and Job Read access. It appears this is necessary because the Parameterized Remote Trigger plugin attempts to call additional APIs apart from just the
/build
and/buildWithParameters
and those calls are the ones that fail.It makes sense that, in order to have the default blocking capability, you need to call additional APIs to poll, but even setting
blockBuildUntilComplete : false
did not fix the issue. Considering that Parameterized Remote Trigger plugin plainly says it "plays well" with the Build Token plugin in its documentation, it really is not an easy feat to make them work together.In my opinion, using the two together isn't an ideal solution because of the necessity for allowing unauthenticated users to browse your jenkins instance via the ui - I suspect you could (although I haven't tried it) get an API Token for a user with only Overall Read and Job Read access instead of giving all Anonymous Users the rights, but this includes the overhead of managing a user and an API Token, which defeats our primary motivation to use the Build Token plugin in the first place.