Build, Test, Deploy. the hello world of CI/CD

When you start at programming the traditional first program you learn to write is: hello_world() and it became quite common on every programming language you choose to learn.

The hello world of CI/CD

In CI/CD you probably noticed the term build > test > deploy > repeat and this is the hello world in DevOps.

But what does it means?

so let’s assume your code is in Python, then there’s nothing to build unlike Go (golang) so why do you need build stage?

Let’s start from end to start

let’s assume your app is already deployed and running at your cloud of choice, how do you update your app to a newer code?

  • first build your code, why build? because it’s easy and convenient to use and deploy on different environments and can be reused or rollback if needed.
  • second test your code, why test? because you want to ensure your app runs without problems or bugs (making sure code does what it needs to do)
  • third deploy your new code (new version), so the users that use your app can have the new features or the newer bugs (that’s a joke) available for use.

How do you write your first CI/CD hello world?

  1. write code in your prefer language of choice
  2. build it via docker, and have a docker image from it (use tag for versions)
  3. run tests on the functions of the code using the built image (from step 2)
  4. deploy the new image after a successful test via docker with new image tag

so have fun with CI/CD and solve this problem for your company

(Visited 156 times, 1 visits today)

Leave A Comment