是否可以设置参数化构建或通过 hudson 构建触发器传递环境变量?

发布于 2024-10-09 09:32:04 字数 201 浏览 0 评论 0原文

我想使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

诗化ㄋ丶相逢 2024-10-16 09:32:04

编辑:我刚刚查找了 Jabber 和 IM 插件。它们都支持参数化构建。 Jabber 从 1.9 开始,对应 IM 1.7。该问题记录在 Hudson 的 JIRA 中 Hudson-5058 下。请不要问我实际需要如何配置参数;我找不到任何相关文档。但是您查看了对该问题所做的更改(可以在


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).

三生池水覆流年 2024-10-16 09:32:04

经过一些初步测试后,我相信我有一个解决方案:

  • 安装 IM 插件
  • 安装 jabber 插件
  • 为我的 hudson 服务设置 gmail/google 聊天帐户

jabber 插件发送响应,因此如果您做错了什么,很容易得到正确的命令等。到目前为止,唯一需要注意的是,我不知道如何触发名称中包含空格的构建,或设置环境变量/参数的值中包含空格。对于其中任何一个来说都没什么大不了的——我可以围绕它们进行工作。 (目前)

我选择了 jabber 方法,因为我不知道如何设置电子邮件触发器,而且 jabber 非常轻松。

这是 hudson 插件在向其发送 !help 命令后发回的帮助。

可用命令:

abort - 指定要执行哪个作业
中止

别名 [[]] - 定义
新别名、删除一个或列出全部
现有别名

botsnack [] - om nom nom

构建[现在|[s|m|h]]
[=]* - 安排一个
工作构建,有标准、定制或无
安静期

评论-
向构建添加描述

h [|-v ] - 显示健康状况
特定作业、视图中的作业或
所有职位

健康 [|-v ] - 显示
特定工作的健康状况
查看或所有职位

jobs [|-v ] - 显示
特定工作的状态,某个工作中的工作
查看或所有职位

q - 显示构建队列的状态

队列 - 显示构建状态
队列

s [|-v ] - 显示状态
特定作业、视图中的作业或
所有职位

时间表[现在|[s|m|h]]
[=]* - 安排一个
工作构建,有标准、定制或无
安静期

状态 [|-v ] - 显示
特定工作的状态,某个工作中的工作
查看或所有职位

测试结果 [|-v ] - 显示
特定工作的测试结果,
视图中的作业或所有作业

userstat - 打印
有关 Hudson 用户的信息

感谢 Peter 的帮助。

After some initial testing I am confident that I have a solution:

  • installed the IM plugin
  • installed the jabber plugin
  • set up a gmail/google chat account for my hudson service

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.

Available commands:

abort - specify which job to
abort

alias [ []] - defines
a new alias, deletes one or lists all
existing aliases

botsnack [] - om nom nom

build [now|[s|m|h]]
[=]* - schedule a
job build, with standard, custom or no
quiet period

comment -
adds a description to a build

h [|-v ] - show the health
of a specific job, jobs in a view or
all jobs

health [|-v ] - show the
health of a specific job, jobs in a
view or all jobs

jobs [|-v ] - show the
status of a specific job, jobs in a
view or all jobs

q - show the state of the build queue

queue - show the state of the build
queue

s [|-v ] - show the status
of a specific job, jobs in a view or
all jobs

schedule [now|[s|m|h]]
[=]* - schedule a
job build, with standard, custom or no
quiet period

status [|-v ] - show the
status of a specific job, jobs in a
view or all jobs

testresult [|-v ] - show
the test results of a specific job,
jobs in a view or all jobs

userstat - prints
information about a Hudson user

Thanks for the help Peter.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文