title: Manipulating Jenkins build parameter with groovy script, used for sonar analysis
body: <p>At the moment, i have Sourcetree making my branches, they will be called "feature/my-branch" and i can send that to my hg repo, and retrieve it from jenkins and build.</p>
  
  <p>but, sonar does not accept "/" in the branch name, so i wanted to change "/" to "-" or something.. in a groovy script in the build phase. </p>
  
  <p>Is something like that possible?</p>
  
  <p>my solution so far:</p>
  
  <pre><code>parameter: BRANCH
  default value: feature/my-branch
  groovy scrips: def replaced = BRANCH.replaceAll(/\//, '-')
  </code></pre>
  
  <p>but it will not recognize my BRANCH, i've tried adding it in all sorts of ways.. </p>
  
  <p>any help to make my <code>"feature/my-branch"</code> be analyzed by sonar will be appreciated.</p>