我知道有很多类似的帖子,但我没有找到解决方案,其他帖子中提出的建议和解决方案与我所看到的并不相符.
这个场景非常简单:我在Eclipse中有一个项目,当我从该项目签到更改到我们的Subversion服务器(即VisualSVN Server 2.5.3)时,我想要我们的Jenkins持续集成服务器(即Jenkins 1.546) )获取此更改并启动新版本.我不想从詹金斯民意调查.
我一直主要遵循本文中的步骤.这是我的post-commit钩子脚本:
repos = WScript.Arguments.Item(0)
rev = WScript.Arguments.Item(1)
svnlook = WScript.Arguments.Item(2)
jenkins = WScript.Arguments.Item(3)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile("C:\Program Files (x86)\VisualSVN Server\log.txt")
objFile.Writeline "repos=" & repos
objFile.Writeline "rev=" & rev
objFile.Writeline "svnlook=" & svnlook
objFile.Writeline "jenkins=" & jenkins
Set shell = WScript.CreateObject("WScript.Shell")
Set uuidExec = shell.Exec(svnlook & " uuid " & repos)
Do Until uuidExec.StdOut.AtEndOfStream
uuid = uuidExec.StdOut.ReadLine()
Loop
objFile.Writeline "uuid=" & uuid
Set changedExec = shell.Exec(svnlook & " changed …Run Code Online (Sandbox Code Playgroud)