CI/CD || Circle CI || React Native Android ( only )

There always comes a time for a company where they feel the need to automate not only their tests, but also the builds, and CI/CD, which is a nightmare for all the developers, soon becoming a reality.

Night Mare

The problem with CI/CD pipelines is that, one can not debug it, you have to wait for the entire pipeline process to finish to determine what and where went wrong 😢.

what went wrong :-(

Something which we developers practise on daily basis and which is always missed in almost all the documentations is modularity.
Just like in all our code bases, CI/CD could be partially debugged by making the jobs and their subsequent steps modular. Another step we need to keep in mind directly comes from the best practices of the coding world “Implement caching from the start, else you will die making it come true”.

NOTE: Circle CI, doesn't offer macOS machine in its free plan and also doesn’t provide parallel execution of its jobs.

Fist we start with making alias so as to minimise the block to its required logic and moving other outside.

We now define the jobs, which we will refer in “workflows” later.

We now define the jobs, which we will refer in “workflows” later. Though one can directly define the jobs in the workflows, but the main agenda to of defining them separately is to keep the config minimal and modular, because it tends to get bigger with time and hence it becomes hard to manage and debug.

Finally, all we need now is to setup the workflow and call the above defined job from it.

Here is the gist of the pipeline.
Keep coding folks 😊🔥.

Keep coding !!

Thank You

Shubham Kakkar | Gmail | Github | LinkedIn

I’m a freelance, multi-disciplinary Web-App Developer who’s delivered creative and engaging tech solutions to various startups.