Multiple SVN revision numbers affecting "Change set" reported by the SVN plugin

23 views
Skip to first unread message

Alex Kress

unread,
Nov 16, 2015, 8:59:09 AM11/16/15
to Jenkins Users
Hi,

I was advised by Manuel Recena to post my question here, hoping you can help me with a problem I've been trying to resolve for quite sometime without any luck.

I am using Genkins SVN plugin (thank you :) ) to run my CI. My jobs are slightly unusual as I use the same job to run tests on multiple branches. I have the following branches:

trunk
QA
unstable

The job is parameterized to take in the path to the branch I want to build. As the job does many other things it was more efficient to do it this way rather than creating 3 separate jobs with a lot of logic duplication.

The issue this is creating is that Jenkins is confused about what has changed between runs. Most often is says that there were no changes. I am guessing it remembers the revision number of the last build, and if the build on another branch has a lower revision number it says that nothing changed.

The job right now is triggered immediately after any change on any of the above branches. So in essence I need it to ignore the revision number from the previous build and just report the *last* change on the branch it is currently looking at. Then,  if there is failure, send the email to the person making the last commit (which is the main problem for me right now).

Is there any way to make this happen?

Thanks a lot!

Alex

Manuel Jesús Recena Soto

unread,
Nov 16, 2015, 9:07:41 AM11/16/15
to jenkins...@googlegroups.com
Hello Alex,

Try to use the option "Always checkout a fresh copy" in Check-out Strategy:
"Delete everything first, then perform "svn checkout". While this
takes time to execute, it ensures that the workspace is in the
pristine state." from official documentation.

Regards,
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/3b96d223-0fda-4198-b5bd-fb4d2c61daf1%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Manuel Recena Soto
* manuelrecena.com [/blog]
* linkedin.com/in/recena

Alex Kress

unread,
Nov 16, 2015, 9:24:23 AM11/16/15
to Jenkins Users
Thanks Manuel, will try this. Does this mean that Jenkins stores the revision of the last checkout separately somewhere in Workspace, which will get deleted with this option? Or does this alternatively prevent it from detecting the revision number of the previous checkout?

Manuel Jesús Recena Soto

unread,
Nov 16, 2015, 9:33:17 AM11/16/15
to jenkins...@googlegroups.com
Hello Alex,

The revision come from the working copy (in the Job's workspace).

If you want to use the same job for building different content (tags,
branches), is the safest way.

Regards,
> https://groups.google.com/d/msgid/jenkinsci-users/630f23ab-1a7a-4d3e-bb83-d504674229cc%40googlegroups.com.

Alex Kress

unread,
Nov 16, 2015, 9:57:14 AM11/16/15
to Jenkins Users
Thanks Manuel. I've tried this but no luck. The job is still saying "No changes", even though it cleaned out all the files and did a fresh checkout. Does it hurt at all that on the job run I am checking out two code branches (one of which did not change) each time, is it possible that it grabs the change set from one of these branches but not the other?

Thank you!

Alex

Manuel Jesús Recena Soto

unread,
Nov 16, 2015, 10:19:53 AM11/16/15
to jenkins...@googlegroups.com
Could you send a screenshot with your configuration and textfile with
eh output console?

I did not understand what you want to do.

Regards,
> https://groups.google.com/d/msgid/jenkinsci-users/04b4f0a6-73c8-46d8-9e71-7b03026d54c5%40googlegroups.com.

Alexander Kress

unread,
Nov 16, 2015, 1:23:34 PM11/16/15
to jenkins...@googlegroups.com
Certainly, please see the attached image, for the "Main" job.

What this shows: I've configured two checkouts, into two different physical locations. Both locations are parameterized and passed in to the job. (I've tried reordering the two just in case).

I have a set of Watcher jobs that watch specific trees, when they notice changes they trigger the "Main" job providing the right SVN path as the parameter. I know for a fact that there were changes (I see them in the change set for the Watcher jobs). The "Main" job however shows that there were no changes on the tree. This results in all sorts of problems, like the emails not reaching the people who broke the build.

Thanks again!

Alex

You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/8FsB-d1Tx20/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CABa-UoeaX%3DU_a%2BnmQySsLn503sYHei3%2BQajOL7g-Si%2BD1B0xXQ%40mail.gmail.com.
genkins-svn.JPG

Manuel Jesús Recena Soto

unread,
Nov 16, 2015, 4:41:01 PM11/16/15
to jenkins...@googlegroups.com
Hello Alex,

Your scenario changes in each email ;)

I don't know why you don't use different jobs....
> https://groups.google.com/d/msgid/jenkinsci-users/CABbeEgvT5r6QJ625KNDb38krMkBmCqPmEPVOtiehUe%2Bg-s2ekA%40mail.gmail.com.

Alexander Kress

unread,
Nov 16, 2015, 7:09:32 PM11/16/15
to jenkins...@googlegroups.com
Hi Manuel,

My bad, I did not mention two jobs to keep things simpler. :) The fact that I am using different jobs should not make any difference as the jobs are fully independent, they have their own workspaces and do their own checkouts. The Watcher job simply triggers the Main job, otherwise there is no connection that I know of.

The problem is with the Main job, that job has parametarized SVN path (please see the image I attached to the previous post) and refuses to indicate the change set no matter what I do. If you have any ideas as to what could be going wrong I would really appreciate it.

Thanks,

Alex

Manuel Jesús Recena Soto

unread,
Nov 17, 2015, 3:57:47 AM11/17/15
to jenkins...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages