title: Jenkins: stash vs archiveArtifacts
body: <p>What are the use cases and pros/cons for using <code>stash</code> vs <code>archiveArtifacts</code>?</p>
  
  <p>The documentation mentions each:</p>
  
  <p>i.e. <a href="https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#stash-stash-some-files-to-be-used-later-in-the-build" rel="nofollow noreferrer">https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#stash-stash-some-files-to-be-used-later-in-the-build</a></p>
  
  <p>and </p>
  
  <p><a href="https://jenkins.io/doc/pipeline/tour/tests-and-artifacts/" rel="nofollow noreferrer">https://jenkins.io/doc/pipeline/tour/tests-and-artifacts/</a></p>
  
  <p>but doesn't do a comparison.</p>