开发者

Trigger a build in Hudson from Visual SVN

Is there a way to trigger Hudson to perform a build when someone commits to VisualSVN Serve开发者_Go百科r? As in is there a way to set up visual svn to send a build trigger to hudson?


VisualSVN Server is a packaged version of SVN, Apache, and some customizations for Windows. In order for subversion to notify Hudson you need to create a standard subversion triggers (you need the post commit hook here). This is possible with VisualSVN Server. Unfortunately, I don't know how to call the necessary URL on a Windows system, but you can always install the Gnu Version on your server.

We configured Hudson to poll subversion and it works fine for us (and is easy to configure).


Hudson can monitor a subversion repository, so I'm not sure why you would want to trigger Hudson. But, in any case create an svn trigger script that uses WGet to make an HTTP request to the Hudson server to make a build start.

Partial intro to svn trigger hooks.

Causing a Hudson build using WGet: /bin/wget -o /dev/null http://YOURHOST/hudson/job/PROJECTNAME/build"


To avoid the needless traffic of polling, use curl to call the build from your post-commit hook.

curl -X POST "http://JenkinsVM:8080/job/Job_Name/build?&token=TOKEN_NAME

The above line assumes curl.exe is in your set path and that you have created the authentication token in your Jenkins job.

I will add that the build job runs faster by performing an svn update as part of your build step, instead of using the Jenkins Source Code Management Subversion plugin. You can download the apache svn command line tools from https://www.visualsvn.com/downloads/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜