Introduction
When running Jenkins pipelines, sometimes you need to save files or data from one part of the pipeline and use them later in another part. Stash and unstash let you do this easily by temporarily storing files and then retrieving them when needed.
When you want to save build artifacts from one stage to use in a later stage.
When you need to share files between parallel branches in a pipeline.
When you want to pass test reports generated in one step to a publishing step.
When your pipeline runs on different agents and you need to move files between them.
When you want to keep your workspace clean but still keep important files accessible.