The Intelligent Cache reuses a given source tree between jobs for both efficiency and reliability. For most configurations this will go completely unnoticed, but the following denotes cases where this change in behavior may require attention.
Depth
Gitlab provides a mechanism to control the git clone depth at the project level. If the value is increased it may not apply correctly until a cache wipe.
The depth can also be
varied by job using the GIT_DEPTH
variable.
Since the source tree is reused the depth may not be applied as desired unless the deepest value is applied to the first
job in the pipeline. If that cannot be guaranteed, it is best to change the overall value to the deepest desired value.
The performance hit caused by the deeper clone will still only be paid once.
Hook
If hooks are utilized to adjust the source tree they must either be applied to the first job in a pipeline or to all jobs.