The versioning and workflow problem - dev teams : git integration?


(Andrew Harris) #1

We have a growing problem with collaboration, versioning and rollback and this post is an extension of a discussion a few of us were just having...

 

You'll have to excuse my ignorance, as I'm not a back-end person, but apparently we've been told that the inbuilt matrix versioning would be too much of a performance hit on our system, and is not an option. In fact, it would only partially solve the problem anyway.

 

Most of our developers use git for their other projects and would love to be able to use it, or something similar for matrix site development. I'm not really talking about standard pages of content on a published site, the case which prompted this post was a project we're running where a team of 5 or 6 are collaborating on a complex site build, where we're all working on individual components of interaction and content across CSS, Javascript, nested content and parse files. Honestly, it was more than a little scary at times.

 

We basically have to work outside of matrix in ways which allow us to manage collaboration, rollback and change management, then paste the code back into matrix in lieu of a 'push' to live. There were almost tears at one point when someone overwrote the wrong file - luckily, it only happened once in the fortnight, and it was only our individual code management practices which saved the day.

 

So, are there ways in which a repository can be used with Matrix?

Is it possible to have a dev system and prod system with a level of automated push from one system to the other?

 

We can't be the only ones hitting this particular wall, so, I guess the question is, how do others do it?

Interested in technical, or business process suggestions.


Integration with GIT
(Bart Banda) #2

Well, one easy thing you could do is to source the JS and CSS files directly from your GIT repo while in development. THat way they would get updated as soon as the branch you are sourcing from is updated. I'll get our implementation best practice officer to provide some more tips as we are currently in planning mode ourselves on how to best do this internally. 


(Anthony Barnes) #3

One of the ways we handle this for clients with site requirements that require a lot of code, or collaboration on code between our regional Squiz offices, is to have a clone of the repository that holds the code outside of the Matrix system. The files may still reside on the same server, or on an external web server and change can be managed by using Git (or SVN). External systems are what we'd generally use if we wanted to get something done rapidly in a development environment, then the changes would be reconciled as assets in the Matrix system for production. Once development is bedded down this loss of dynamically updated content directly from a version repo isn't usually so much of an issue. We may still have a development environment in the background that uses the files direct from the repo.

 

If your plan is to have the content stored and maintained in a version repo over a long period of time and you want the changes reflected in Matrix there is no streamlined way of doing this. We do have a lot of tools that actually let us push changes into a Matrix system externally (meaning we can use something like commit hooks). Obviously that kind of system is push only, meaning you can no longer make editing changes to those affected assets in Matrix without everything getting out of sync. There are some business processes to sort out with editors to make that work, obvioulsy you won't want them editing assets who's content is being sourced from elsewhere. There are also some technical limitations and off the top of my head one of those would be parse files. When you add content you need to tell the Matrix system to re-parse it... I'd be a little wary of having this triggered outside of someone sitting down and clicking the commit button.