Reputation: 749
Is it possible to configure the GitLab CI to only perform a sparse checkout? I have inherited a large codebase, most of which I can ignore when running the CI. If I can't do a sparse checkout, is there anything to be gained by setting the GIT_CLEAN_FLAGS to perhaps discard directories that I don't care about?
Upvotes: 4
Views: 1256
Reputation: 10754
Sounds like a good case for breaking up the repository.
Git clean would not help as the files you want to remove are version controlled so git clean acts on untracked files only and would not remove them.
You could try setting the GIT_STRATEGY variable to none to prevent gitlab from cloning the repository and then performing the checkout yourself using a sparse checkout in your job script.
variables:
GIT_STRATEGY: none
Upvotes: 4