Use an artifact for clean to work even if the branch has been deleted
If the branch associated to a pipeline is deleted before pipeline completion, jobs fail because they cannot clone the repository.
That makes clean
job fail to destroy the VM if the branch is deleted while the pipeline is running.
A solution can be to store data needed for clean
in an artifact in deploy
, and make clean use GIT_STRATEGY: none
for not cloning the repository and only rely on data stored in the artifact.