jenkinsci / jenkinsci/subversion-plugin
[JENKINS-38943] SVN_REVISION environment variable not set when URL includes capitalized hostname
- Dominant language
- Java
- Stars
- 131
- Forks
- 275
- Avg merge
- 12h 4m
- Merged PRs (30d)
- 6
Description
When a project uses Subversion SCM and references the repository using a URL with an upper-case hostname, the SVN_REVISION environment variable is not set within the build.
The Jenkins application log contains the following warning:
```
Oct 12, 2016 1:19:24 PM hudson.scm.SubversionSCM buildEnvVars
WARNING: no revision found corresponding to https://MYSERVER.mydomain.com/svn/path/to/project/trunk; known : [https://myserver.mydomain.com/svn/path/to/project/trunk]
```
This problem was resolved by updating the repository URL to use a lower-case hostname.
---
Originally reported by dpotter, imported from: SVN_REVISION environment variable not set when URL includes capitalized hostname
Raw content of original issue
When a project uses Subversion SCM and references the repository using a URL with an upper-case hostname, the SVN_REVISION environment variable is not set within the build.
The Jenkins application log contains the following warning:
Oct 12, 2016 1:19:24 PM hudson.scm.SubversionSCM buildEnvVars
WARNING: no revision found corresponding to https://MYSERVER.mydomain.com/svn/path/to/project/trunk; known : [https://myserver.mydomain.com/svn/path/to/project/trunk]This problem was resolved by updating the repository URL to use a lower-case hostname.
environment
```
Jenkins 2.7.4 running on CentOS 7 with Openjdk 1.8.0_91
Windows Build Agent running on Windows Server 2012 R2 (but I doubt the agent matters)
Jenkins launched like this:
{{export JENKINS_HOME=/opt/jenkins
java -Dsvnkit.http.methods=Basic,NTLM,Negotiate,Digest -Djava.security.krb5.realm=mydomain.com -Djava.security.krb5.kdc=myhost.mydomain.com -Dsun.security.krb5.debug=false -Djavax.net.ssl.trustStore=cacerts -jar jenkins.war --httpPort=-1 --httpsPort=8080 --httpsKeyStore=/opt/jenkins/jenkins.jks --httpsKeyStorePassword=mypass &}}
```
Contributor guide
Assessment
This issue has not been assessed yet.