A Drone CI v0.5 plugin to give the ability to use git's sparseCheckout feature.
Use docker image peterdavehello/drone-git-sparse-checkout for clone process, set the sparseCheckout value to the file contains the sparseCheckout file list, additionally, give the clone depth you want, that's all.
Reference: http://readme.drone.io/0.5/usage/customize-clone/
clone:
image: peterdavehello/drone-git-sparse-checkout
depth: 5
sparseCheckout: sparseCheckout-list.txt
To leverage the benifit of sparseCheckout - do not checkout all the files to filesystem, actually the real process here is to init an empty git repository, setup remote and sparseCheckout, and then pull from remote, would be a little bit different then the origin git clone.
In short, the git clone
here is actually git pull
with pre-set repository and configs.
GPL-3.0