Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plugin to commit hudson build artifact

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

like image 990
rest_day Avatar asked Mar 07 '26 23:03

rest_day


1 Answers

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.

like image 137
CJBrew Avatar answered Mar 09 '26 15:03

CJBrew