title: How to start and stop redis server in a jenkins build?
body: <p>Hi I am configuring jenkins build for my rails project. </p>
  
  <p>My project uses redis for caching. </p>
  
  <p>So, my build steps goes as</p>
  
  <ol>
  <li><p>start redis server</p></li>
  <li><p>run specs</p></li>
  <li><p>stop redis server.</p></li>
  </ol>
  
  <p>Problem:</p>
  
  <p>If I have all these steps in as a single build step, though spec fails, jenkins returns 'success'(because of last command passes)</p>
  
  <p>If I have the 'stop redis server' command in a seperate build step, since the rspec fails, this steps doesn't run at all.</p>
  
  <p>So, how can I achieve, "Jenkins build should fail if spec fails and still it should run the next step(stop the redis server)" ?</p>
  
  <p>Pls help.</p>