是否可以设置参数化构建或通过 hudson 构建触发器传递环境变量?
我想使用 IM 插件或者电子邮件触发器来启动构建。作业/构建需要一个参数,我必须使用触发机制来设置该参数。
在查看 jabber/IM 插件时,看起来这是不可能的(参数部分)
有人以某种方式解决了这个问题吗?我应该使用其他机制吗?
构建服务器不在面向公共/互联网的计算机上 - 它位于我们的内部网络内。当前构建由 SCM/SVN 提交触发。
I'd like to use the IM plugin or maybe an email trigger to initiate a build. The job/build needs one parameter that I would have to set with the trigger mechanism.
In looking at the jabber/IM plugin it does not look like this is possible (the parameter part)
Has anyone solved this in some way? Should I use some other mechanism?
The build server is not on a public/internet facing machine - it is within our internal network. Current builds are triggered by an SCM/SVN commit.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我将使用 URL 来触发构建。请参阅参数化构建。网址是
您还可以查看远程访问 API 了解其他选项。
在构建软件项目中,您可以请参阅有关如何配置电子邮件触发器的示例。只需将 URL 替换为参数化构建页面中的 URL 即可。
编辑:我刚刚查找了 Jabber 和 IM 插件。它们都支持参数化构建。 Jabber 从 1.9 开始,对应 IM 1.7。该问题记录在 Hudson 的 JIRA 中 Hudson-5058 下。请不要问我实际需要如何配置参数;我找不到任何相关文档。但是您查看了对该问题所做的更改(可以在
I would use an URL to trigger the build. See Parameterized Builds. The URL is
You can also check into the Remote Access API for other options.
On the Building a Software Project you can see examples on how to configure an email trigger. Just replace the URL with the one from the Parameterized Builds page.
EDIT: I just looked up the Jabber and IM Plugins. They both support parametrized builds. Jabber since 1.9 which corresponds to IM 1.7. The issue is logged in Hudson's JIRA under Hudson-5058. Please don't ask me how you actually need to configure the parameters; I couldn't find any documentation for that. But you have a look at the changes made for the issue (the links to the code changes can be found in Hudson-5058).
经过一些初步测试后,我相信我有一个解决方案:
jabber 插件发送响应,因此如果您做错了什么,很容易得到正确的命令等。到目前为止,唯一需要注意的是,我不知道如何触发名称中包含空格的构建,或设置环境变量/参数的值中包含空格。对于其中任何一个来说都没什么大不了的——我可以围绕它们进行工作。 (目前)
我选择了 jabber 方法,因为我不知道如何设置电子邮件触发器,而且 jabber 非常轻松。
这是 hudson 插件在向其发送 !help 命令后发回的帮助。
感谢 Peter 的帮助。
After some initial testing I am confident that I have a solution:
The jabber plugin sends responses so if you do something wrong it is fairly easy to get the right commands, etc. The only caveat so far is that I don't know how to trigger a build with a name that has a space in it or to set an env var/parameter with a value that has a space in it. No big deal for either of those - I an work around them. (for now)
I chose the jabber method because I could not figure out how to set up email trigger and the jabber was pretty painless.
Here is the help that the hudson plugin sends back after a !help command is sent to it.
Thanks for the help Peter.