Persist to workspace runs even when there is no subsequent job
A workflow consists of a number of jobs. A common setup is to have a build job followed by a release job, where the build job always runs but the release job only runs on a tag. In order to work, the workspace has to be passed from the build job to the release job. As such, the build job has to end with `persist_to_workspace`.
But this means that `persist_to_workspace` is being called on the build jobs where it is utterly pointless. This slows down the build and wastes your disk space.
This proposal is for CircleCI to change `persist_to_workspace` so that it is a no-op if there is no subsequent job in the workflow.
- run: echo "build"
- run: echo "release"
As a separate request, it should be a lot easier to pass the whole diskspace from one job to another. Currently it requires 4 lines in the first job and 3 lines in the second job. Can we not have sensible defaults for the root and path?