Putting utility scripts inside .circleci/ to avoid "checkout" step?




I can’t find the documentation about what exactly besides config.yml can/should be put inside .circleci/
There’s this example that puts the primary container’s Dockerfile in there, but it seems to be for reference only : https://github.com/CircleCI-Public/circleci-demo-docker/tree/master/.circleci

There’s a lot of duplication between the different deploy jobs in my config.yml, which I’d like to move to a shell script. Do I need a checkout step in the job in order to access to the script, or can I somehow take it with me in .circleci/ ?

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

You’d either do checkout, or you can use Workspaces to persist those scripts.


Thanks, so you can’t use .circleci/ to store things that config.yml would use, without a checkout step ?


Not really. .circleci/ isn’t a special directory. It’s just where we keep the config file but it’s versioned and used just like any other directory in your repo.


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.