1

I have done thru where do bug fixes go in git flow and the git flow and github flow pages.

There are scenarios many times when we need to show demo of new functionality and on same day fix issues of prod. So for a few hours have one branch in QA and for a few hours another.

Or pushing to beta/ UAT we want to test in staging/ QA env. But our pipeline auto builds master branch push.

Wanted to know what others do? Do you pause the pipeline's trigger and have a parameterised pipeline so that you can trigger it manually and specify the branch that you want it to use?

This is not about git flow as it is about automation, testng and devops process to acheive this.

2 Answers 2

2

Yeah, although the hotfix itself will be merged back into master at some point, unless you have multiple, or spin up on demand test/QA environments, you will need to switch your CI/CD pipeline around a bit.

I keep the deployment step manual rather than triggering automatically. Unless you are super confident in your super ninja trunk based mono repo CD pipeline, its nice to have a human pulling the trigger on deploys.

This gives you an intercept point where you can say... you know what, actually deploy this branch build, thanks.

Hopefully your approval/audit stuff is still there and people are actually checking to make sure this isn't abused to deploy feature branches to live without testing etc.

But you know... try it occasionally to see if they are

1
  • 2
    Many CI/CD solutions allow you to specify approvers for deploying to each environment. This helps prevent people from circumventing process and paperwork. Mar 17 at 0:26
0

! Deploying and testing a hotfix repo branch in different environments can vary depending on the Git Flow variant being used. Here are some general steps that can be followed for two popular Git Flow variants: Git Flow and GitHub Flow.

Git Flow Variant Deploying a Hotfix Branch Create a new hotfix branch from the production branch. Make the necessary changes to the hotfix branch. Test the hotfix branch locally to ensure that the changes work as intended. Merge the hotfix branch into the production branch. Deploy the production branch to the production environment. Testing a Hotfix Branch Create a new hotfix branch from the production branch. Make the necessary changes to the hotfix branch. Test the hotfix branch locally to ensure that the changes work as intended. Merge the hotfix branch into the production branch. Deploy the production branch to a staging environment. Test the changes in the staging environment to ensure that they work as intended. If the changes pass the tests in the staging environment, deploy the production branch to the production environment. GitHub Flow Variant Deploying a Hotfix Branch Create a new hotfix branch from the main branch. Make the necessary changes to the hotfix branch. Test the hotfix branch locally to ensure that the changes work as intended. Merge the hotfix branch into the main branch. Deploy the main branch to the production environment. Testing a Hotfix Branch Create a new hotfix branch from the main branch. Make the necessary changes to the hotfix branch. Test the hotfix branch locally to ensure that the changes work as intended. Merge the hotfix branch into the main branch. Deploy the main branch to a staging environment

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.