Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EnvVar SVN_REVISION and SVN_URL not set

The environment variables %SVN_REVISION% and %SVN_URL% aren't set when I use a SVN repository running on a Visual SVN server. All other SVN interactions work fine, e.g. checkout and change detection. Running the job with another SVN server works too.

Freestyle job configuration:

Repository URL:            http://SERVERNAME:81/svn/Projects/ProjectName__5_9_1_3/trunk
Local module directory:    trunk
Repository depth option:   infinity

Output of windows set command in the build operation (SVN_REVISION and SVN_URL missing)

...
SESSIONNAME=RDP-Tcp#0
SystemDrive=C:
SystemRoot=C:\Windows
...

System information

  • Jenkins: v1.531
  • Subversion plugin: v1.51
  • JAVA Runtime: v1.6.0_35
  • VisualSVN Server: v2.7
like image 919
Sascha Vetter Avatar asked Sep 27 '13 13:09

Sascha Vetter


2 Answers

The Jenkins error log put me on the right track:

WARNUNG: no revision found corresponding to http://SERVERNAME/svn/Project/trunk; known: [http://servername/svn/Project/trunk]

It seems that Jenkins/subversion/SVNKit is case sensitive and in my case I wrote the server name in capital letters by mistake.

like image 187
Sascha Vetter Avatar answered Nov 17 '22 04:11

Sascha Vetter


It happened to me today that I have several SVN paths being checked out for the project and thus they all have different revision number. Jenkis ended up creating several variables: SVN_REVSION_1, SVN_REVISION_2, etc...

You can add at the end a Batch script and use the SET command (Windows) so you can see in the console output all the variables available and their values.

like image 39
Guillermo Ruffino Avatar answered Nov 17 '22 04:11

Guillermo Ruffino