Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins detects SVN changes but doesn't update workspace?

I'm using Jenkins 1.461 and I have an issue when using SVN polling. My repository URL has the form svn+ssh://*****. I've configured Jenkins to poll for changes every 5 minutes. What happens is that every 5 minutes, changes are detected :

Started on May 2, 2012 8:26:24 PM Received SCM poll call on for XXXXXXXXX on May 2, 2012 8:26:25 PM svn+ssh://X.X.X.X/svn/XXXX/XXXXXXXXX/XXXXXXXX/trunk is at revision 26,192 (changed from 26,181) Done. Took 2.6 sec Changes found

But, the workspace is not updated after each poll. The last revision of the workspace is still 26181 and not 26192 as expected. I don't understand why. Any idea?

Mickael

like image 247
manash Avatar asked May 02 '12 17:05

manash


People also ask

Does Jenkins work with svn?

The Jenkins Subversion plugin uses SvnKit as the subversion client and doesn't require a native client to be available on the host. Setting up a CI server with Jenkins and Subversion is limited to a very minimal installation process: just run the Jenkins WAR and you're done.

How does Jenkins integrate with subversion?

Now create a Jenkins build job. Select New Item, give the build project a name such as svn-tomcat-demo, select Maven project, and click OK. Under source code management, select Subversion and enter your SVN repository URL and credential. Please download the sample code and check the code into your SVN server.

How do I add subversion credentials to Jenkins?

Next to the Repository URL text box click the question mark. In that box will be the following text: "click this link and specify different credential". Click on that link to open the Subversion Authentication page. On that page enter the root of the repository URL, enter the login and password to use and click OK.

What is update in svn?

The SVN update Command. The svn update command lets you refresh your locally checked out repository with any changes in the repository HEAD on the server. It also tells you what has been changed, added, deleted. If a change has been made to a file you have also changed locally, svn will try to merge those changes.


2 Answers

Are the clocks on your Jenkins and SVN server in sync? If the clocks are off by even a little, strange things will happen. I do not use SVN much myself, so I do not remember if this was one of the symptoms but it would be good to start by checking the clocks.

Easiest would be to install ntpd on both hosts, configure them to sync against the same source and forget about it. If you do not have an ntp server in your organization, check http://www.pool.ntp.org

like image 102
sti Avatar answered Oct 13 '22 13:10

sti


Using @HEAD at the end of SVN URL is actually solving the problem as mentioned by Mickael Marrache in the comment above.

like image 32
DeenaDeepak Avatar answered Oct 13 '22 13:10

DeenaDeepak