ajw4sk
ajw4sk

Reputation: 105

Testing hotfixes on a stage site before production, in a git workflow

I'm working with the Git Flow branch model, using master and develop. Specifically, like this model: Git Flow branching model

This model doesn't look like it takes hotfixes into account very much. When I started my current project at work there were hundreds of bugs. There are three developers on this team who are currently working on bugs. Our process is as follows:

  1. Work locally to fix bug
  2. After you fix bug it needs to get tested by QA on a stage testing site

    • if it passes testing, then it goes to production

    • if it fails, goes back to developer and repeats process

My question is what branch should the stage site be on? If there was one developer pushing one bug through at a time I'd get merging the hotfix to master, then updating the stage site for testing and a pass, before updating production. This gets tricky with multiple developers when our QA is a shared resource that spends half of his time on another product as well. On average, I'd say there are 6-7 bugs ready to be tested when the QA guy has a chance to get through them.

Couple of the ideas we've had on how to deal with it are:

have stage on a hotfix branch (but this kind of goes against the model)

push our hotfix branch to gitlab and then switch the stage branch whenever testing that specific hotfix.

Has anyone else come across this issue, and if so, how did you deal with it?

Upvotes: 1

Views: 1221

Answers (1)

Marina Liu
Marina Liu

Reputation: 38136

The stage site can be on release branch. From what you mentioned, it seems you didn’t have release branch, but it will be very useful if the QA guys works on release branch. Let’s view each branch’s function.

master: project used for production

develop: After you fix bugs, you need to merge hotfix branch to develop branch. it's verified project, it can work normally.

release: QA site works on, if it passed, then merge it to master branch; else return it to develop branch

hotfix: debug and fix bugs on it. When you fix a bug, you need to merge it to develop branch

By this way, it can separate QA guys and developers differently.

Upvotes: 1

Related Questions