DEV Community

coktopus
coktopus

Posted on

2 2

Automation of helm | step 5

To automate helm deployment we a need circleCI configuration.

BRANCH FILTER

workflow provides an option to filter the branches on which the circleCI pipeline runs:

DEV

workflows:
  main:
    jobs:
      - deploy:
          filters:
            branches:
              only: 
                [project-for-video-dev]

PROD

workflows:
  main:
    jobs:
      - deploy:
          filters:
            branches:
              only: 
                [project-for-video-prod]

ORBS

  • gcp-gke is use to interact with kubernetes engine running in gcloud. It have commands like create-cluster, delete-cluster, and so on . we use rollout-image which updates the deployment with latest image.

  • gcp-gcr has built in commands and gcr-auth is use to authenticate the user and it will take the credentials from environment variables of circleCI.

All the images stored in Google Container Registry is a perfectly working image and ready to deploy on environment . so replace the current tag running tag with the newer one in config.yml and push it to repository and merge it to the branch which triggers the circleCI pipeline and circleCI is already setup to run rollout-image command.

EXAMPLE

dev branch contains config.yml file and all the values required to update dev. If any tag will merged to dev branch it will trigger the pipeline and update the dev-deployment with the newly merged tag of image and same in the case of other branches like prod.

KUBERNETES PROCESS

Once the pipeline is triggered, the kubernetes run their blue-green deployment process and update the image with zero down time.

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay