We use the Gitlab CI pipeline with stages “build” and “review”.
The “review” stage uses “GIT_STRATEGY: none” and gets all content from artifacts (from the “build” stage).
But because we don’t start with an clean empty directory, the current artifacts are mixed with code of older builds (older artifacts).
So we get an mix of different versions (in case of new or deleted files) which breaks our software.
For example in the “vendors” directory of our software the files are mixed together, so I don’t have the chance to only rely on files brought into the project workspace from cache or artifacts.
I’ve tried to use a before_script to clean the directory, but it’s called after downloading the artifacts. So it’s too late to delete the current directory.
We think something like “GIT_STRATEGY: empty” would be nice to start with an empty directory. So we really have only the content of the current artifacts into the directory.
Or is there an other possibility to clean the directory before unpacking the artifacts?
Thanks for your help!