Skip to content

Separate Master branch with respect to Production Environment and Add New Staging Environment #5

@Prajwalprakash3722

Description

@Prajwalprakash3722

We currently have a single Master branch in our repository that will be used for both production and staging env. However, we would like to separate the Master branch into two distinct branches - one for Production and one for Development. This will help us better manage our codebase and ensure that changes made in the Development environment are thoroughly tested before being deployed to Production.

In addition, I would like to create a new Staging environment to test changes before they are merged into the production branch. This will allow us to catch any potential issues or conflicts before they impact the Production environment.

changes proposed:

  • Keep the master branch as production branch, This branch will only be used for Production deployments.

  • Create a new branch called staging from the current Master branch, This branch will only be used for Staging deployments.

  • Update our deployment processes to use the appropriate branch for each environment.

Workflow is as follows, All the members shall take a PR request to staging branch and have a review and merge it, when the staging branch is stable we shall take a PR with master branch and merge it :) [Two Branch Workflow]

graph LR
    A(Members) --> B(Staging)
    B --> C{Pull Request}
    C -->|Review and Merge| B
    B --> D(Staging Environment)
    D --> E{Test and Validate}
    E -->|Approved| F(Master)
    F --> G(Production Environment)
Loading
  • A developer creates a new branch off of the production branch to work on a new feature or bug fix.
  • The developer makes their changes and creates a pull request to merge their branch into the staging branch.
  • Other developers or team members review the pull request, make comments or suggestions, and ultimately approve or reject the pull request.
  • If the pull request is approved, the changes are merged into the staging branch and the code is tested in the staging environment to ensure that it is stable and does not introduce any bugs or conflicts.
  • Once the changes have been thoroughly tested in the staging environment, a new pull request is created to merge the changes into the production branch.
  • The pull request is reviewed and approved, and the changes are merged into the production branch and deployed to the production environment.

Metadata

Metadata

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions