DEV Community

Cover image for 6 master tips you'll ever need to set up reliable CI systems
Pragyan Tripathi
Pragyan Tripathi

Posted on • Edited on

6 master tips you'll ever need to set up reliable CI systems

Setting up continuous integration is one of the most redundant works every DevOps engineer is asked to do.

Here are 6 rules for you to set up Continuous Integration (CI) Systems:

1. Keep all the logic for building your code in scripts in your git repository.

As the system grows, dependencies grow with it silently. It becomes fragile, easy to break, and hard to set up.
Don't let anything into your build server that you can’t set up with a script

2. Gate merging code on the results of tests, and mercilessly hunt down and resolve unstable tests.

Do everything you can to make the setup and tear down of your dependent services consistent and know when they are complete.

3. Speed of your gates will directly impact developer velocity and productivity, keep it lean and be consistent with mocks or dummies in your testing code.

Periodic refactoring of the tests, or even the whole build process, will pay off in overall developer productivity.

4. Make sure all the developers can reproduce what gets run in the CI system by themselves.

Encourage mocks and dummies, and setup up patterns in your tests.
The less you depend on external resources for tests, the faster your test run will be to validate core logic.

5. Cascade your builds and tests, driving full integration tests with CI systems.

If you have acceptance tests and user scenarios fully automated, your whole product can move far more agilely and effectively, evolving with the business needs.

6. Develop, measure, and review benchmarks about your product from your CI systems.

Memory footprints, CPU and IO budgets, tracing of calls and timing for user interactions and computationally intensive functions. This enables you to find unexpected failures in a complex system

I hope these rules help you set up an effective CI system for your company.

Thanks for reading this.

If you have an idea and want to build your product around it, schedule a call with me.

If you want to learn more in DevOps and Backend space, follow me.

If you want to connect, reach out to me on Twitter and LinkedIn.

Top comments (0)