title: Why would fastlane scan tests keep rebuilding and running in Jenkins Pipeline?
body: <p>I have a pipeline job running on Jenkins that runs iOS unit tests.</p>
  
  <p>I'm seeing some really strange behaviour when our tests fail, fastlane shows the failure in it's summary, but then begins to rebuild the code and re-test.</p>
  
  <p>This happens continually, and I can not figure out if it's a fastlane/scan setting I am missing, or something with running this in a Jenkins Pipeline.</p>
  
  <p><code>bundle exec fastlane test</code> runs locally just fine, and only executes once per device defined in my scan file.  </p>
  
  <p>My console output looks like so:</p>
  
  <pre><code>[11:26:36]: fastlane finished with errors
  [!] Test execution failed. Exit status: 65
  #######################################################################
  # fastlane 2.19.3 is available. You are on 2.17.0.
  # It is recommended to use the latest version.
  # Please update using `bundle update fastlane`.
  #######################################################################
  2.19.3 sigh Hotfix
  * fix sigh undefined variable regression (#8457)
  2.19.2 Snapshot improvements and more
  * Add tests for ReportsGenerator available_devices
  * Fix HTML report generation for snapshot
  * Prioritize options passed to supply
  * Collect logs for iOS 10+ devices
  * Add row for Fabric.app-installed fastlane to env command
  * Sigh reports better errors for team members
  * Expand the notes_path parameter
  * Update xcov intialization
  2.19.1 Hot fix for provisioning profile creation/deletion
  - Re-implement csrf token retrieval for provisioning profiles (#8410)
  - don't attempt to create apps on the dev center and itc if mac app (#8404)
  To see all new releases, open https://github.com/fastlane/fastlane/releases
  Please update using `bundle update fastlane`
  /Users/hudson/build/workspace/MNELastWord-PR-Pipeline@tmp/durable-ba2bbebe/script.sh: line 2: shell_session_update: command not found
  Sending interrupt signal to process
  ▸ Cleaning Pods/CocoaLumberjack-iOS [Debug]
  ▸ Check Dependencies
  ▸ Cleaning Pods/Bento-iOS-Lib-iOS-BentoResources [Debug]
  ▸ Check Dependencies
  ▸ Cleaning Pods/AFNetworking-iOS [Debug]
  ▸ Check Dependencies
  ▸ Cleaning Pods/JSONModel-iOS [Debug]
  </code></pre>
  
  <p>You can see after fastlane completes, it just goes on it's merry way and starts to rebuild and re-test instead of exiting the job.</p>
  
  <p>Based on this output, I <em>think</em> it's something in Fastlane causing this to re-execute, because there's no output from Jenkins that indicates the stage is getting called again.</p>
  
  <p>That said, I see nothing in fastlane issues on Github about this, other than Snapshot having a retry option (which I am not using snapshot)</p>
  
  <p>for completeness, here's my <a href="https://gist.github.com/kaosdg/b920c658eec9a3def83bd7180ee124ab" rel="nofollow noreferrer" title="Scanfile">Scanfile</a>, <a href="https://gist.github.com/kaosdg/a1e94c2000da1febdcf4f9618e91c54a" rel="nofollow noreferrer" title="Jenkinsfile">Jenkinsfile</a>, and <a href="https://gist.github.com/kaosdg/46c28f5d839a90c66504d37ada804582" rel="nofollow noreferrer" title="Fastfile">Fastfile</a></p>
  
  <p>and screens from relevant jenkins config: <a href="https://i.stack.imgur.com/u2wGo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u2wGo.png" alt="Jenkins Screenshot"></a></p>
  
  <p>Can someone help out here?  I've tried the latest fastlane, older fastlanes, and still see the behaviour.  </p>
  
  <p>My DevOps and SAs are getting pretty upset with us because our jobs never end, and are hanging our jenkins nodes :) (aborting/terminating them is really problematic)</p>