I have a conditional halt in one of my jobs. Just before the halt I write out to a file, and I would like to persist the file.
echo “Job halted” > ~/workspace/file.txt
circleci-agent step halt
I then try to persist the file.
- persist_to_workspace:
root: ~/workspace
paths:
- file.txt
when: always
However the persist step never runs. How can I save the file? Thanks.