I want to know what can be the best architecture concerning my case. In my organization I am planning to use Git, Jenkins and Gitlab. I have 4 Dev sandboxes and 4 QA sandboxes which point to different projects and cannot be changed. Then I have one Staging sandbox and One Production Sandbox. What should be my architecture in this case since--

  1. I want whenever code is pushed into any one of the QA sandboxes it should reflect the changes in other sandboxes as well.
  2. what should be my master repo should it be production? or should it be my staging sandbox?

I mean there are lot of confusions to what to adapt and how to go along in this pattern?

1 Answer 1


Here is what I do in my projects - I have a similar software stack. Bitbucket (for Git and GitLab stand in), Jenkins, Force Migration Tool. Every Dev has their own sandbox and I use 3 release sandboxes (plus production) - Developer Integration -> User Acceptance Testing -> Stage -> Production.

There are two key things here:

  1. Git is the source of truth
  2. Master Git branch represents production - you should be able to deploy master into any sandbox and it would be similar to a refresh

With this in mind you should be following the standard GitHub workflow: https://guides.github.com/introduction/flow/

Using this your Pull Requests will contain the change artifacts that you need to deploy through your release environments. As Pull Requests are created/updated/approved Jenkins can verify/deploy using the force migration tool to the appropriate release sandbox.

If you have multiple projects happening at the same time it gets a little more complicated as the active pull requests may end up conflicting with each other such that UAT may reflect the latest deployment and not all the active open pull requests. For this we have a separate branch in Git that we merge all open pull requests into first (A UAT branch) that is the branch you want to deploy to Integration and UAT environments so you are not overwriting other changes from other pull requests.

  • What about the QA sandboxes?? and every dev cannot have their own sandbox in my scenario. I have 4 dev sandboxes and 4 qa thats it . Commented Sep 16, 2016 at 14:53
  • Generally we do first pass QA in the Dev Orgs and then extensive QA in UAT. You could certainly add other QA orgs and deploy changes to those.
    – Stephen
    Commented Sep 16, 2016 at 19:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .