SVN_REVISION_2

34 views
Skip to first unread message

Carl Parsons

unread,
Mar 12, 2015, 7:19:37 AM3/12/15
to jenkins...@googlegroups.com
Hi

I have a build job with 3 svn checkouts Jenkins gives me SVN_VERSION_1 SVN_VERSION_2 etc it appears the be the last checked in value for my branch rather than svn revision.
Why is this I want the value to mark my builds
 My work around is to do a svn info in the checked out directory in a bash window put the value in a file read the file in a groovy script and display in the build window.
Instead of just putting SVN_REVISION_2 in the groovy script.
Carl

bash
export SVN_REV_REPO=`svn info $WORKSPACE/svn_systest|grep Revision|awk '{ print $2 }'|tr -s " "`
echo "${SVN_REV_REPO}" > "${WORKSPACE}/svnversion"
groovy postbuild
manager.addShortText("SVN #" + manager.build.getParent().getWorkspace().child('svnversion').readToString() )

Daniel Beck

unread,
Mar 12, 2015, 1:17:32 PM3/12/15
to jenkins...@googlegroups.com

On 12.03.2015, at 12:19, Carl Parsons <pin...@gmail.com> wrote:

> it appears the be the last checked in value for my branch rather than svn revision.
> Why is this I want the value to mark my builds

There's no actual difference in the checked out directory between the two revisions, so it reports the one that indicates the last actual change.

One advantage is that this makes it easier to see at a glance that there was no change between two builds checking out the same revision.

Reply all
Reply to author
Forward
0 new messages