Search code examples
gitversion-controlcontinuous-integrationproduction-environmentmerge-conflict-resolution

How to deal with other teams working directly in the production environment?


I work for a team in a large company, tasked with setting up continuous integration for them. The problem is: how do I deal with other teams that work directly in the production environment?

The current setup is as follows.

Devs within my team work in their own environments, using their own branches. They merge upstream to a testing environment. Occasionally, the testing branch gets merged upstream to a user acceptance branch in its own environment. This, in turn, gets merged upstream occasionally to the production environment, which is our master branch.

The problem comes from the existence of other teams that we don't have any authority over:

The other teams will not use our repository, and they will make relatively frequent changes in the user acceptance environment, and sometimes even in the production environment.

What is a good strategy to deal with this problem?

Should we do automatic (daily) pushes from the production/UA environments into their respective branches? If so, how do we deal with conflicts that might arise? Are there better solutions?

I apologize if this question has been asked before but I did my best to find an answer here and elsewhere, without success. I have read many resources on version control strategies but they all seem to make the basic assumption that other teams will use the same repository, and will not make changes in the production environment directly, but use version control to merge upstream to the master branch.


Solution

  • If you really can't make them use a version control system, the only solution I can think of is to write a script (running on the production environment) that will commit and push their code periodically. At least, you will be able to pull it for your team in order to merge it before pushing your own code.

    That is NOT clean. At all. But you seem to be very desperate, and I guess you can't just get rid of them.