Build script generated virtual hosts and farm files not deployed in the Cloud Manager Build & Unit Testing Phase
Hi All,
I have the below scenario -
We are using a build script to generate the Virtual hosts and Farm files in our dispatcher folder.
STEP 1 -
When running this deployment on cloud the virtual host and farm files are not listed in the CREATE_DISPATCHER_CONFIGURATION_ZIP phase as shown below -
Begin stage: CREATE_DISPATCHER_CONFIGURATION_ZIP
adding: conf.d/enabled_vhosts/ (stored 0%)
adding: conf.d/enabled_vhosts/README (deflated 11%)
adding: conf.d/available_vhosts/ (stored 0%)
adding: conf.d/available_vhosts/default.vhost (deflated 48%)
adding: conf.dispatcher.d/available_farms/ (stored 0%)
adding: conf.dispatcher.d/available_farms/default.farm (deflated 58%)
adding: conf.dispatcher.d/enabled_farms/ (stored 0%)
adding: conf.dispatcher.d/enabled_farms/default.farm (stored 0%)
adding: conf.dispatcher.d/enabled_farms/README (deflated 7%)
STEP 2 -
When committing the files in the repo and deploying the below results are seen -
Begin stage: CREATE_DISPATCHER_CONFIGURATION_ZIP
adding: conf.d/enabled_vhosts/ (stored 0%)
adding: conf.d/enabled_vhosts/brandA.vhost (stored 0%)
adding: conf.d/enabled_vhosts/README (deflated 11%)
adding: conf.d/available_vhosts/ (stored 0%)
adding: conf.d/available_vhosts/brandA.vhost (deflated 68%)
adding: conf.d/available_vhosts/default.vhost (deflated 48%)
adding: conf.dispatcher.d/available_farms/ (stored 0%)
adding: conf.dispatcher.d/available_farms/default.farm (deflated 58%)
adding: conf.dispatcher.d/available_farms/brandA.farm (deflated 63%)
adding: conf.dispatcher.d/enabled_farms/ (stored 0%)
adding: conf.dispatcher.d/enabled_farms/default.farm (stored 0%)
adding: conf.dispatcher.d/enabled_farms/README (deflated 7%)
adding: conf.dispatcher.d/enabled_farms/brandA.farm (stored 0%)
As seen the custom brandA farm file and virtual hosts files are picked and working as expected.
Why is this behavior so ?
I read a note on the link https://experienceleague.adobe.com/docs/experience-manager-cloud-manager/content/using/code-deployment.html?lang=en

Is it because the Cloud Manager expects the file to be committed in the repo ?
If so, then is it not possible to have script generated vhosts, farms, mappings deployed on the cloud ?
@arunpatidar , @sachin_arora_, @lukasz-m , @santoshsai , @debal_das , @mohit_kbansal , @joerghoh , @kautuk_sahni
Update -
The Adobe Enterprise Support Team has the below response for this whole problem -
The only way to update dispatcher configs is in code [1].
You first commit the code to the CMGR repo, then when you run a pipeline CMGR executes the maven commands and implements the code. If it isn't in the CMGR repo then it won't be in the code that CMGR builds
[1] https://github.com/adobe/aem-guides-wknd/tree/main/dispatcher
Thanks,
Rohan Garg

