#4 CircleCI config Walkthrough

Puja Bhattacharya
1 min readSep 24, 2019

--

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:

  1. start with defining a version.
  2. Workflows: which define the sequence of a job
  3. Jobs: will have the steps for the setup, jobs for running tests and storing the results.
  4. 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?

  1. run commands
  2. save & restore cache
  3. run different tests
  4. 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.

--

--

Puja Bhattacharya
Puja Bhattacharya

Written by Puja Bhattacharya

I live to pen down my experiences, i love to start a conversation in randomness

No responses yet