Jenkins - 如何在本地计算机上提交代码后立即自动更新 SVN 生产副本?
Jenkins - How can I auto update SVN Production Copy as soon as I commit the code on local machine?
我是詹金斯的新手。我正在尝试一个简单的连接,我的工作副本在 Windows 服务器上,我正在将代码提交到充当主存储库的远程 Linux 服务器。
我的部署代码位于安装了 Jenkins 的另一台服务器上,并希望在我在工作副本上提交任何内容后立即将 SVN 更新为 运行。我已经完成了 post-commit 连接,Jenkins 也通过适当的修订和代码更新获得了关于此的更新,但物理 SVN 更新没有在该服务器上进行。我做错了什么?
# Working Copy - Windows
# Main Repo - Linux Machine
# Code Deployment Server - Another Linux Machine [Here I am getting intimation about what changes are committed with revision number but physical "SVN COMMIT" is not happening]
### post-commit code on Main Repo machine:
------------------------------------------------
#!/bin/sh
CRUMB=$(curl -s 'http://username:password@hostname:8080/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)')
curl -X POST -H "$CRUMB" "http://hostname:8080/job/title/build?token=svnwillbetriggeredremotely" --user username:password
一旦我在 Windows 机器(工作副本)上提交,它就会在我需要 "SVN UPDATE" 工作的主部署服务器上提供以下信息:
Workspace of titlename on master
[I get all the filenames as updated with proper content and revision number]
我要的是部署服务器目录下的"SVN UPDATE"到运行
我的詹金斯配置:
Subversion URL - MainRepoHostname
Local module directory - Path for the local deployment directory where I need SVN UPDATE to work
Check-out Strategy - Use 'SVN Update' as much as possible.
我自己找到了解决方案。
其实是在工作空间目录下更新,不能直接给出绝对路径。我们需要使用 shell 执行来做到这一点。我这样做了,并在 "Execute Shell" 中输入了命令,它起作用了。
我是詹金斯的新手。我正在尝试一个简单的连接,我的工作副本在 Windows 服务器上,我正在将代码提交到充当主存储库的远程 Linux 服务器。
我的部署代码位于安装了 Jenkins 的另一台服务器上,并希望在我在工作副本上提交任何内容后立即将 SVN 更新为 运行。我已经完成了 post-commit 连接,Jenkins 也通过适当的修订和代码更新获得了关于此的更新,但物理 SVN 更新没有在该服务器上进行。我做错了什么?
# Working Copy - Windows
# Main Repo - Linux Machine
# Code Deployment Server - Another Linux Machine [Here I am getting intimation about what changes are committed with revision number but physical "SVN COMMIT" is not happening]
### post-commit code on Main Repo machine:
------------------------------------------------
#!/bin/sh
CRUMB=$(curl -s 'http://username:password@hostname:8080/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)')
curl -X POST -H "$CRUMB" "http://hostname:8080/job/title/build?token=svnwillbetriggeredremotely" --user username:password
一旦我在 Windows 机器(工作副本)上提交,它就会在我需要 "SVN UPDATE" 工作的主部署服务器上提供以下信息:
Workspace of titlename on master
[I get all the filenames as updated with proper content and revision number]
我要的是部署服务器目录下的"SVN UPDATE"到运行
我的詹金斯配置:
Subversion URL - MainRepoHostname
Local module directory - Path for the local deployment directory where I need SVN UPDATE to work
Check-out Strategy - Use 'SVN Update' as much as possible.
我自己找到了解决方案。
其实是在工作空间目录下更新,不能直接给出绝对路径。我们需要使用 shell 执行来做到这一点。我这样做了,并在 "Execute Shell" 中输入了命令,它起作用了。