Plugin to commit hudson build artifact

青春壹個敷衍的年華 提交于 2019-12-02 04:20:32

问题


Are there any plugins available which will commit the build artifact back to SVN?


回答1:


I believe the svn publisher will meet your needs.




回答2:


Unfortunately Svn Publisher is not really finished and requires quite a bit more work before I can use it in anger.

I've found I can do what I need with a shell/cmd script executed as a build action (or of course post-build would work), although it's not really ideal. The script just uses standard svn command line functions and looks something like:

svn mkdir http://my.server:port/project/branches/buildArtifacts/${BUILD_ID}/ --username USERNAME --password PASSWORD -m "JIRA_ISSUE This is a commit message"

svn co http://my.server:port/project/branches/buildArtifacts/${BUILD_ID}/ BuildArtifacts --username USERNAME --password PASSWORD

cd BuildArtifacts
cp ../../build/${BUILD_ID}/*.xml .

svn add *

svn ci --username USERNAME --password PASSWORD -m "JIRA_ISSUE This is a commit message"

So, we create the new folder for the build artifacts in Subversion, check it out to a local (in-workspace) folder, copy what we want in, svn add those items then commit everything back.

Personally, I am still not sold on the benefit of having build reports in Subversion, but we need to have persistent storage of this information -- the Jenkins server isn't a good repository for it.

Writing a custom plugin or actually fixing Svn Publisher would be a better solution long term.



来源:https://stackoverflow.com/questions/2446136/plugin-to-commit-hudson-build-artifact

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!