Blog
Engineering
3
minutes

Your CI GitFlow is Broken

One of the great things about GitFlow is that it makes parallel development very easy by isolating new development from finished work. New development, such as features, is done in feature branches and is only merged back into the main body of code when developers have validated the feature and the code is ready for release. For most development teams, feature validation happens in a staging branch coupled with a single testing environment. When this single environment is broken, releases are delayed, developers are stressed, and your team loses the benefits of GitFlow - promoting parallel development. In this article, I will explain why using a single testing environment breaks the GitFlow benefits and introduce a solution to get dynamic testing environments per branch - Preview Environments.
Romaric Philogène
CEO & Co-founder
Summary
Twitter icon
linkedin icon

GitFlow with a single testing environment: what's wrong?

When developers' teams use GitFlow, 1 branch for staging and 1 branch for production are created and live in parallel. The process is simple, once a feature branch is done, it is merged back into the staging branch - which is associated with a testing environment. All the tests from this environment must be green to proceed and merge the staging into the production branch - which will lead to releasing the feature. A picture is worth a thousand words; here is what a traditional GitFlow looks like

Traditional Release GitFlow

But here are the main issues of using a single testing environment.

Slow release cycles

The testing pipeline is green ✅ All the developers can test their features

With a single testing environment, the testing pipeline is a SPOF (Single Point of Failure) since every developer relies on it to finish their work.

The testing pipeline is broken ❌ All the developers can't test and release their features

A broken pipeline delays all the features that were supposed to be released. Plus, it becomes a very stressful experience for the person responsible for fixing it.

Does not scale

The more the development team grows, the less they can ship fast since they are all contended to wait for their turn to run their tests in a single production-like environment.

A single testing environment does not scale with several developers

Waste of money (and not green 🌎)

Most of the time, development teams let their testing environment running 24/7, which is an important loss of money. Let's say your testing environment costs you $1000/month and you use it only 200 hours per week. By running it 24/7, you lose ~$700/month. Plus, in a world where we need to take care of our planet, unused resources must be released.

Some pros

It will not be fair to criticize this kind of architecture since it is still very popular - and for very good reasons - the simplicity of setup and the ease of maintenance.

The GitFlow Cure: Preview Environments

A valid solution that would be to provide a dedicated testing environment for every Pull Request - this is what we call Ephemeral Environment or Preview Environment. The concept is simple. Instead of being forced to merge your feature into a staging branch to test the feature in a single testing environment, a production-like environment is created for each Pull Request opened.

Here is an example of what Qovery does when you create a new Pull Request - a production-like environment is created!

The environment will have everything similar (backend, frontend, database...) to the production to test in the best conditions. Developers, QA, Product Managers, and all people in the product development can share Preview URLs to test and validate the new feature.

Once the Pull Request is merged or closed, the environment is destroyed, and the resources are released! Then developers can now test and release features in parallel without having to wait for each other! The GitFlow is fixed!

Modern Release GitFlow with Preview Environments

Since Preview Environments are dynamic, on-demand, and created automatically, they provide additional benefits such as:

  • being always in sync with the production
  • cost-efficient since they are created only when necessary and destroyed when no longer used

Here is a demo example of a Preview Environment with Qovery

The only reproach we can do on Preview Environments is that it is complex to build a reliable system, working with full-stack applications and microservices. Plus, the maintenance cost can be higher than a single static testing environment.

Conclusion

In this article, we have seen how to reconcile the GitFlow methodology with a testing flow. Preview Environment is the key to helping the developers team to test and release features faster than before. Even if implementing a PReview Environment system is complex, solutions exist - Qovery, for instance, provides a platform to get the Preview Environments in less than 30 minutes with zero maintenance cost.

Share on :
Twitter icon
linkedin icon
Ready to rethink the way you do DevOps?
Qovery is a DevOps automation platform that enables organizations to deliver faster and focus on creating great products.
Book a demo

Suggested articles

Qovery
 minutes
Our rebrand: setting a new standard for DevOps automation

Qovery unveils its new brand identity, reinforcing its mission to make DevOps simple, intuitive, and powerful. Discover how our DevOps automation platform simplifies infrastructure, scaling, security, and innovation across the full DevOps lifecycle.

Romaric Philogène
CEO & Co-founder
Qovery
3
 minutes
We've raised $13M Series A to make DevOps so simple, it feels unfair

I'm excited to announce our $13M Series A, led by IRIS and Crane Venture Partners with support from Datadog founders and Speedinvest. This investment will fuel our mission to make DevOps simple and scalable, expand in the US and Europe, and accelerate product innovation.

Romaric Philogène
CEO & Co-founder
Observability
 minutes
Qovery Observe is Here: Your Deployments, Your Data, Your Visibility

Monitor your deployments with Qovery Observe: real-time metrics, logs, and events, directly integrated with your AWS applications and containers.

Julien Dan
Technical Product Manager
DevOps
9
 minutes
Top 10 Fargate Alternatives: Simplify Your Container Deployment

Tired of complex cloud setups? Explore the top 10 Fargate alternatives and discover how Qovery can simplify your container deployment, saving you time and money.

Mélanie Dallé
Senior Marketing Manager
Compliance
DevSecOps
12
 minutes
AWS HIPAA Compliance: A Comprehensive Guide & Checklist

Learn how to achieve and maintain HIPAA compliance on AWS with this comprehensive guide. Understand the shared responsibility model, essential architectural principles, and a practical checklist to protect PHI and avoid costly compliance violations. Discover how automation can reduce human error and streamline your security posture.

Mélanie Dallé
Senior Marketing Manager
DevOps
8
 minutes
Top 10 DuploCloud Alternatives: Choosing a Better Platform for Your DevOps Needs

Looking for a DuploCloud alternative? Explore why a full-stack platform like Qovery offers a faster, more developer-friendly solution. Compare the top 10 options to find a platform that simplifies DevOps and accelerates your deployments.

Mélanie Dallé
Senior Marketing Manager
Azure
9
 minutes
The Essential Guide to Azure Infrastructure, Monitoring, and Management Tools

Master Azure infrastructure management with this comprehensive guide. Learn the four critical pillars - governance, cost control, security, and operations - and discover the essential native and third-party tools needed to scale your cloud strategy effectively.

Mélanie Dallé
Senior Marketing Manager
Cloud
10
 minutes
Cloud Sprawl Explained: Taming Uncontrolled Cloud Growth

Tame uncontrolled cloud growth and regain control of your infrastructure. Learn the causes of cloud sprawl, its impact on your budget and security, and strategies to build a more sustainable cloud environment.

Mélanie Dallé
Senior Marketing Manager

It’s time to rethink
the way you do DevOps

Say goodbye to DevOps overhead. Qovery makes infrastructure effortless, giving you full control without the trouble.