Support git strategy with Kubernetes executor
git_strategy CI/CD setting currently doesn't work with the Kubernetes executor. This was discussed internally(internal-only link) and we determined that it's probably possible with a shared volume.
- The Kubernetes executor does not store the old builds/repo for reuse with the next build in the
- This leads into having to do a
git clonefor every job instead of doing a
git fetchafter the first build, which can create unnecessary load when you have large repositories.
- Non root images, we need to have the build directory writeable for non root images, but not 777 permissions, something like #1736 (comment 376415811)
I'm proposing that we should support
git_strategy with the Kubernetes executor.
Proposal (revised Jun 08, 2020)
A volume is currently created for the builds directory, but it's not persistent so it is deleted along with the pod at the end of the job.
Make the volume a PVC so that it's persisted across builds.
gits_strategyshould work automatically after - reference
This should be able to be controlled through settings, similar to the docker executor's
Related discussion here.