Use a unique CI_PROJECT_DIR
This avoids interference from [1].
On a docker executor, /builds is a directory on a volume which is shared across multiple jobs. While planned concurrency is taken into account in that directory name, this breaks when previous jobs cannot be cleaned up completely.
To work around that, use a subpath within /builds that is unique.
Edited by Michael Hofmann