Commit a file to SVN using Jenkins Job

818 Views Asked by At

I am new to Jenkins. I want to build a jenkins job which replaces files in SVN repository and commits them. The SVN repository has folders and files in it which we replace and commit manually right now to SVN. Using the Jenkins job itself, I can place the files on a server, not sure if that will be helpful for Jenkins to replace and commit those files to SVN.

Is this possible with Jenkins? (using Jenkins Enterprise) I have mostly seen posts and questions about triggering build after commit in SVN using Jenkins. So, not sure if this is even possible.

1

There are 1 best solutions below

0
smelm On

Jenkins allows you to execute shell commands in a pipline. So you can execute the same shell commands as you would on your local machine:

sh 'svn commit -m "my message"'

or if you are on a windows node:

powershell/cmd 'svn commit -m "my message"'

Personally I have no experience with svn, but this approach works well with git and I strongly assume it also works with svn.