Make all files under .circleci/ available to config.yml without checkout


#1

Hi,

A few months ago I asked whether it was possible to put other files (typically small scripts used by deploy steps) in .circleci/ alongside config.yml :

The answer was that .circleci/ is not a special directory, you still need a checkout step if you want to reference its contents in config.yml. Only .circleci/config.yml is a special case that doesn’t require checkout.

It would be great for readability and modularity if this changed, and everything under .circleci was immediately usable by config.yml without a checkout step.

Right now if you want to make config.yml modular and readable by moving some steps into scripts (to be called several times with different parameters), you have to do a full checkout (which otherwise wouldn’t be required if the job is a deploy-only job for example, as opposed to a build/test job).

Or, if you want to avoid a checkout step, then you need to forget about external scripts and stick all of the logic inside config.yml itself, possibly repeated in different jobs, which isn’t very readable or maintainable.

Do you think this can be addressed ?


#2

Just kicking some ideas around here, but you could have a separate repo for these scripts, and do a Git clone (or shallow clone) to pull them into place.

Also, you don’t have to do a full clone when running a project - just drop the checkout step and do a shallow clone of your project in a run command.


#3