Skip to content
A sane workflow for managing large circleci configurations.
Makefile Shell
Branch: master
Clone or download
samsalisbury copythis: Makefile: atomically update config.yml
- Prior to this, a failed 'circleci config process' would leave
  a half-baked config.yml in place, that Make would consider up to date.
Latest commit 7cd733a Aug 1, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci ci: add test for circleci-cli 0.1.5691 Jun 24, 2019
copythis.circleci copythis: Makefile: atomically update config.yml Aug 1, 2019
.gitignore add very simple test Jun 20, 2019
LICENSE
Makefile multiple documentation updates Jul 26, 2019
README.md README: updated for accuracy Jul 11, 2019
install install: also re-gen config after install Jul 26, 2019

README.md

CircleCI

CircleCI Multi-File Config

A sane workflow for managing large circleci configurations.

Why?

CircleCI configuration can grow very large, this project lets you break up your config into separate files for ease of management.

As a bonus, it also allows you to use full 2.1 syntax, including orbs, even on on-prem CircleCI Enterprise which currently only supports 2.0 syntax.

What is it?

This repo contains a Makefile and other required supporting files in copythis.circleci/ which you can copy to your own project's .circleci/ directory. The Makefile's main target make ci-config generates a single 2.0 syntax .circleci/config.yml from the yml file tree in .circleci/config/ in 2.0 or 2.1 syntax.

Installation

Copy everything (including dotfiles) in copythis.circleci to your own project's .circleci directory. Copy the git pre-commit hook file to that project's .git/hooks directory, so you don't shoot yourself in the foot.

Once that is done, see the usage README in that directory.

If you already have a .circleci/config.yml simply rename it to @config.yml and then run make ci-config. You can begin breaking up the @config.yml into separate files under the .circleci/config directory, as you see fit.

This is all supported by the circleci-cli tool anyway, but the Makefile and git hook make it much more convenient to use.

Usage

Please see the Usage README!

What does each file do?

├── README.md                # This file.
├── copythis.circleci        # Dir containing stuff to copy.
│   ├── .gitattributes       # This file tells GitHub not to show diffs for the generated config.yml
│   ├── .gitignore           # This file tells git to ignore temp files.
│   ├── Makefile             # This is the main file defining the workflow.
│   ├── README.md            # The usage README. You should copy this into your .circleci dir too!
│   └── pre-commit           # Git pre-commit hook. Highly recommended to use this.
You can’t perform that action at this time.