Harnessing the Power of DevOps - Or at least Starting to ๐Ÿ˜‚

Harnessing the Power of DevOps - Or at least Starting to ๐Ÿ˜‚

My first CircleCI project, and failing jobs ๐Ÿ˜…

ยท

3 min read

Introduction

I have always thought of tech as magic - Well, at least when I was younger. I would see applications such as a calculator, alarm and even a reminder, and always wondered how the people who made them went about it. They would always work great and were easy to use... How did they do that?? Must be magic !

magic.jpg

Well, fast forward to a couple of years later, and I am now slowly turning into a magician. I mean, I am a developer at the moment, and can develop applications in JavaScript with React and Node.js frameworks, but I do not consider myself a complete magician yet. Why you may ask? This is simply because with each step I make in the tech field, the term magician in my head gets a new meaning. With each advancement I make the learning curve, I realize that there is a new concept that I do not understand that a better magician carried out. This was recently brought out when I made my first CircleCI project.

Project Development

The aim of the project was to have a function to add two numbers in the main file. A test file would then feed two values to a function that calls the Add function from the main file and asserts that the result is as expected. If successful, the function prints that Add is working great. To break it down better:

Project utilities

The goal

Circle CI was used to test whether the main-test file imports from main file and runs the code correctly. In case of failure, the error should be captured in the pipeline.

Code files

I finally pushed the project to Github for accessing here.

Lessons

From the project, I got to understand how jobs are created in circleCI. I learnt how the configuration YAML file is written, and its importance. I tested the files by changing the values in the test file to make the result from the Add function unequal to the value in the test file function to be compared with. I got to see a few magic tricks too:

  1. Each time a job failed, I received an email on the error. I never knew this was a feature, I was greatly impressed. This showed that I could know when an error in my code occurs at any time.

  2. With each alteration in the code, the project would run in CircleCI anew. Hence, all the jobs and their steps would be executed again. This results in the errors being identified with each edit made to the code.

  3. The code error line and error is identified by CircleCI. From the platform, I was able to get a report on the exact location of my error, which made the correction a very easy step.

Conclusion

Reading content on a tech concept, and actually carrying out a project to practice is very different. Practicing is essential and vital in improving magic skills. I may not be a world-renowned magician yet, but I am certainly a better magician today, and becoming a better one with each passing day.

Reference Material

ย