Creating Pipeline is like baking a cake 🍰 🎂, But being a QA make sure it tastes great..! I mean Test!😊

I just started learning GitLab ci-cd recently and found we should have a clear understanding of what is pipeline and how we can relate in real life. I always understand things better when it relates to our real life. This article is not technical at all. but you can relate to it and based on the foundation of fundamentals we can easily build up our knowledge. Or you might create your own pipeline too :)

To set up the expectations after reading through this article you will relate the Pipeline concept with your real-life and maybe you will found a base of CI-CD concepts and we will take a small technical but real-world example of Pipeline

Before jumping to what is Pipeline forget for a minute that you are reading something technical here and we can start now.

Let’s relate it to a real-world example, Assume you are sitting at your home 🙇🏻 , and bored of eating regular food 🍲 🍛 and your sweet tooth feel to eat a Chocolate cake 🍰 🎂 , and instead of buying a cake from a bakery shop, you wanted to make it in your home and reward yourself a delicious cake and satisfaction of “Yes, I can bake a cake” , of course, you wanted to become a chef for a day. :) 👨‍🍳

So, let’s start…! Our goal is to bake a cake at home and nothing fancier, So what is the first thing you will do? you will list out all the ingredients for baking a cake, then you will list down the preparation steps to bake a cake. so let’s begin our journey…! 🏄

Step:1 Ingredients for cake: You will list down what ingredients you will need for baking cake, lets think, and list down all

-Milk 🍶

-Sugar 🍚

-Butter 🍯

-Eggs 🍳

-Cream 🍨

Flour , And How can you forget the most important thing 😀

-Chocolate 🍫 :)

now, we have all ingredients with us, let’s go ahead…!

Step:2 Procedure for baking a cake: Of course you have to bake a cake you can not just eat all the ingredients and feel like eating a cake, I mean you can eat them but our goal is to bake a cake so we have to understand what should be the procedure to bake a cake: :), So One by one list down them below:

But, ah, wait… You can’t say the cake is delicious without eating it…! :) So, let’s taste it and let me know how your cake taste like :)

Step:3 Serve a cake and eat:

If yes, Great. You are a perfect version of yourself of becoming Chef, tap your back now, and be proud of yourself of trying! Now, lets go technical a bit.

The technical way of Pipeline:

Well, What we have done is we just break it down our step of baking cake in steps, we followed a procedure to bake a cake, we step by step arranged our work in a better way and organized way, without having ingredients we can not start baking cake. so we defined step by step procedure to carry out our goal. This is what a Pipeline actually do.

“A pipeline is a sequence of steps that we want to do to achieve our goals”

To say a bit in a technical way:

“A pipeline is a group of jobs that get executed in stages.”

Try Yourself too. :) This is how our Pipeline will look in a technical way, have a look below:

What I have done here:

You can see I just created a basic cake baking pipeline using some technical things, I mean Unix commands, etc.

Then, I just have given some names to identify these stages. and one by one I just added them like below which What I have done in real life:

just save it and voila, your first pipeline is ready :) and it will look something like below when completes.

Remember we are newbie in baking cake, sometime our cake will not bake correctly, or will not taste great. it means Our Pipeline will fail sometime.

Don’t lose hearts, check what is wrong and try to google, one day our cake will bake and taste great. I mean our pipeline will run successfully. Just practise daily

Of course, I am QA, and I want to taste it I mean Test it, I just added very basic level checks. :) like a real-world taste of cake taste like :)

You can fine the above code im my gitlab public repo too: https://gitlab.com/anandbhagwatdevops/chocolatecake

Conclusion:

We have learned what is the meaning of pipeline in the real world and how we can create a pipeline out of this understanding. of course, the way of writing pipeline in code varies based on which CI-CD tools you use. this is just an example of how easily a pipeline can be made. The goal is to understand the concept and based on this you can achieve your goal of learning and implementing CI-CD. find out how you can use CI-CD concepts to automate the routine task and how you can structure it in a better manner.

And remember in this world of DevOps we are shifting left towards Development lifecycle, you will be asked to carry out CI-CD tasks, QA’s expertise lies Software Testing and we should be strong enough in that, but when Time arises you have to be a chef I mean a DevOps enabler for your team. grab the skill and build on top of that. I am in the phase of learning this too 😊

Feel free to share your feedback and questions on this article. let me know how can I improve too.

Author: https://www.linkedin.com/in/anand-bhagwat/

You can find the above code im my gitlab public repo too: https://gitlab.com/anandbhagwatdevops/chocolatecake

Happy Learning..! 😊

Software QA Engineer who do QA and DevOps stuff

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store