问题
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
回答1:
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
回答2:
Using @HEAD at the end of SVN URL is actually solving the problem as mentioned by Mickael Marrache in the comment above.
回答3:
This is what I did to resolve the issue.
Click Enable Auto Refresh (top right hand corner of the screen)
1) Click on my Project
2) Click configure
3) Under General Tab, scroll down to "Source Code Management"
4) Add "@HEAD" behind the Repository URL
5) Click "Save"
6) Click "Apply" (Important)
7) Click "Build Now" for my projectClick on my Project >> Recent Changes
Now you will see your project gets updated with the most recent commit from your repository.
来源:https://stackoverflow.com/questions/10418814/jenkins-detects-svn-changes-but-doesnt-update-workspace