If you are able to put some shell commands in your CI server you can use curl to create, build, download, upload, and install packages. All the API is here:
what do you mean with "whole content"? All the content in the JCR? I don't think, that this really a good idea, because it will bloat up your SCM.
I would recommend to restore a PROD backup on your test instances from time to time. That's less resource-consuming on the PROD system, and you have exact images in case you want to debug any problem.
Sarwar, thanks for your reply.
I was thinking about having a script relying on filevault to fetch the content from let's say '/content' and push it to a SCM or somewhere else. Keep daily or weekly tags so in case we bring someone in the team we can build the CQ instance in the dev machine putting all the pieces together (vanilla CQ + hotfixes + OSGi components + data) instead of copying a production instance.
Has anyone come up with an approach like this before?
That is exactly my problem, I am not aware of any SCM that could cope with such big amount of data.
Copying a PROD backup to dev instances could have undesired effects. For instance, in my place they use translation.com connector for i18n and copying production will not only open up the passwords used there also the config of this connector, making any change to submit an unnecessary translation request to translation.com.
You can also create one more replication agent in your prod system that will trigger "on Modification" and will point to a staging system. This way you will have updated content but not prod specific configuration.
Also I don't think having "Content" in SCM is a good idea. If you want to debug some problem just create package of that part of cotent from staging and then test.
I will explore that option, looks very interesting.
I am fairly new in CQ, so based on what you are saying can you point a replication agent from author to author?
What would happen if someone is testing a new feature in test changing some content that also exist in prod and someone else changes the same content in prod? Would it get overwritten?
if you use replication, the ACLs and the Annotations in the content will be dropped. And I would avoid to replicate every change on an authoring instance because of the additional load.
That isn't a problem, if you do it this way:
- have all your environment specific configurations (e.g. translation.com password and connector data) in OSGI configuration nodes in the repository.
- Use runmodes to pin certain configurations to a certain runmode.
- Have dedicated runmodes for PROD and for TEST
In that case you could update your TEST environment like this:
- Restore the instance from PROD backup
- Change the runmode definition in the start script
- Start it up.