Cannot access variables passed in Subversion URL

Article ID:219304837
1 minute readKnowledge base

Issue

  • Cannot access SVN_URL and SVN_REVISION environment variables in my Subversion jobs

Environment

  • CloudBees Jenkins Enterprise

Resolution

URLs in general are case-sensitive (with the exception of machine names). There may be URLs, or parts of URLs, where case doesn’t matter, but identifying these may not be easy. Users should always consider that URLs are case-sensitive. Reference: https://www.w3.org/TR/WD-html40-970708/htmlweb.html

Additionally, URLs used for Subversion repositories may not contain a double-slash //

Either of the above two conditions will typically result in the SVN_URL, SVN_REVISION variables to be passed into the job undefined (blank/empty values).

This URL will work successfully: https://devops.cbn.acme.corp:8443/svn/DevOps/CJP/cjp-lis/trunk

These two URLs typically will not work: https://DEVOPS.cbn.acme.corp:8443/svn/DevOps/CJP/cjp-lis/trunk https://devops.cbn.acme.corp:8443/svn/DevOps/CJP//cjp-lis/trunk

If you encounter other issues with Subversion URLs, it might be due to the way your build scripts are passing in variables to the end of the URL to append mainline or branch paths (e.g. /trunk or /branch/1.0). Please check case sensitivity of the URL, number of slashes or other characters, and ensure you’re running the latest version of the Subversion Plugin.