title: Jenkins conditional build step based on files changed from SVN
body: <p>I am trying to find a way to have Jenkins conditionally execute a build step based on the type of files that were included in the pull from SVN. That is, if the build included a change to any SQL files, I want to execute the 'database check' build step.</p>
  
  <p>I have my SVN server set with a PostCommit script that calls Jenkins to start a build.  This PostCommit script does inspect the type of files that were included in the commit and will call the appropriate Jenkins job based on the file types.  However there are some scenarios where there is overlap, and having multiple Jobs for a single solution seems like a maintenance problem.</p>
  
  <p>So far I have tried to use the <a href="https://wiki.jenkins-ci.org/display/JENKINS/Conditional+BuildStep+Plugin" rel="nofollow noreferrer">Conditional BuildStep Plugin</a> and I use a Regular Expression match condition using the expression <code>${CHANGES, showPaths=true}</code>.  I got the idea for this expression from this <a href="https://stackoverflow.com/a/14570074/1440607">SO</a> answer.</p>
  
  <p>Here's what the Conditional Step looks like:
  <img src="https://i.imgur.com/rJAzYil.png" alt="Imgur"></p>
  
  <p>When I attempt to execute this Job, I get the following Jenkins error which makes it sounds like the <code>CHANGES</code> token is not supported:</p>
  
  <pre><code>Run condition [Regular expression match] enabling prebuild for step [BuilderChain]
  Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Unrecognized macro 'CHANGES' in '${CHANGES, showPaths=true}'], action = [Fail the build]
  Build step 'Conditional steps (multiple)' changed build result to FAILURE
  Build step 'Conditional steps (multiple)' marked build as failure
  </code></pre>