CircleCI🔗
CircleCI is a platform / product for Continuous Integration and Continuous Delivery.
It integrates with Github (and Github Enterprise) and Bitbucket. (i.e. Not compatible with Gitlab, which has its own workflow).
Setup🔗
2 Steps:
- Presence of
.circleci/config.yml
file in Github repo - "Set Up Project" for that repo on app.circleci.com
Config.yml File🔗
Varies depending on complexity of application
Generally a good structure to list out 'jobs' (tasks) at the top and workflows (jobs to perform) below
Isolating Git Branches🔗
Use Cases: - Deploying to a production environment, staging environment, and testing environment based on git branch - Not wasting resources trying to test / deploy branches that are for development / breaking changes
In config.yml
, add filters:
property to jobs that should only run when code is committed to specific branches
Text Only | |
---|---|
Prevent Typo Hell🔗
Requires CircleCI Local CLI
Use circleci config validate
from the project root directory to validate config file before pushing to version control.
NOTE Install Local CLI (sudo to install to /usr/local/bin): curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | sudo bash
Created: June 7, 2023