触发哈德森构建时使用svn commit [英] Trigger hudson build when svn commit

查看:122
本文介绍了触发哈德森构建时使用svn commit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了这将是由开发者用来提交和更新其code版本控制系统(颠覆)(比方说,它的地址是的 https://开头的服务器/ SVN /项目)。仅举只有经过身份验证的用户将能够访问项目的SVN。

I have already set up a version control system (subversion) which is going to be used by developers to commit and update their code (let's say that its address is https://server/svn/project ). Just to mention that only authenticated users will be able to have access to project's svn.

在另一方面,我已经安装了哈德森服务器作为项目的持续集成服务器(该项目的地址是服务器:8080 /任务/项目)和我想的以下内容:

On the other hand, I have installed Hudson server as project's continuous integration server (address of the project is server:8080/job/project ) and I would like the following:


  • 哈德森建立被自动触发时,有一个SVN提交。

  • 邮件发送给相应的开发人员时,他们的承诺code不建(即承诺code中的那些)。 (这意味着当用户A提交code不建,只有用户A获得与电子邮件通知)

只是提一提,我已经设置基于矩阵的授权用户哈德森,因为我不希望对所有人开放的。

Just to mention that I have set matrix-based authorization for Hudson users, because I don't want to be open to anyone.

我已经看到了一些建议后提交挂钩,但他们没有工作至今。

I have seen some suggestions for post-commit hooks, but none of them worked until now.

有人建议我在这两个问题怎么办?具体操作步骤是AP preciated。

Can somebody suggest me what to do in both issues? specific steps would be appreciated.

推荐答案

据<一个href=\"http://wiki.hudson-ci.org/display/HUDSON/Building+a+software+project#Buildingasoftwareproject-BuildsbychangesinSubversion%2FCVS\">\"Building一个软件项目#在颠覆/ CVS变化构建,哈德森需要查询您的SVN回购,以便及时发现变化并触发构建。

According to "Building a software project # Builds by changes in Subversion/CVS", Hudson needs to poll your SVN repo in order to detect changes and trigger the build.

不过,可在每个启动从SVN提交,如在这个线程。结果
隶书是在颠覆插件页。

However, that can be initiated on each commit from the SVN, like in this thread.
The official script is at the Subversion Plugin page.

REPOS="$1"
REV="$2"
UUID=`svnlook uuid $REPOS`
/usr/bin/wget \
  --header "Content-Type:text/plain;charset=UTF-8" \
  --post-data "`svnlook changed --revision $REV $REPOS`" \
  --output-document "-" \
  --timeout=2 \
  http://server/hudson/subversion/${UUID}/notifyCommit?rev=$REV

但它规定:

对于这项工作,您哈德森有允许匿名读取系统访问。结果
如果访问控制你的哈德森是更严格,您可能需要指定的用户名和密码,这取决于你的身份验证的配置方式。

For this to work, your Hudson has to allow anonymous read access to the system.
If access control to your Hudson is more restrictive, you may need to specify the username and password, depending on how your authentication is configured.

这篇关于触发哈德森构建时使用svn commit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆