#4 CircleCI config Walkthrough
In the fourth part of setting up the CI/CD pipeline, we would discuss how to integrate a CI/CD tool to any of your project.
**Assumption: You have chosen CI/CD your tool. I am choosing CircleCI here, Jenkins is a widely accepted standard tool. There are others like, Travis, Hudson etc.
So now what? Well you create a config.yml file(YAML?It is hash with key: value pair. Keeps writing configs simple.) inside a .circleci folder in your work repository.
A basic config file will generally:
- start with defining a version.
- Workflows: which define the sequence of a job
- Jobs: will have the steps for the setup, jobs for running tests and storing the results.
- Each job will have multiple steps.
Basic file content is as follows:<Treat it like a CircleCI cheatsheet>
1. version: It’s value can be 2/2.1/2.0<CircleCI version>
2. jobs: This is the smallest unit of a circleci run.
3. steps: A collection of usable commands.
4. working_directory: You define your project_name here.
5. checkout: Magic key which checks out master to working directory.
What can you do with a circleci config file?
- run commands
- save & restore cache
- run different tests
- store reports
Have questions? Shoot me a mail!
Github repo: contains a sample I set up on the same.
Next part: We discuss what is a minimum steps circleci config file should contain for a successful run.