Search code examples
continuous-integrationkentico

how to synchronise a folder in a Web app with the website?


I'm getting into Kentico development and I'm playing around with the continuous integration.

I have separated my VS solution from the website folder and publish my changes from the web application to the website.

however the CI system in Kentico saves it's serialized items in the /CMS/App_Data/CIRepository folder in the website.

So I need a way to easily get the changes in that folder back into my VS solution, so I can check them in to my source control.

In other words a folder that is synched between the website and VS web application. what would be the best approach for this?


Solution

  • Here's what I came up with. a new/second developer can install an empty site. Then create a symbolic link folder in his site pointing to the CIRepository folder that is inside the solution folder (which is under source control).

    mklink /d D:\Sites\KenticoReferenceQA\CMS\App_Data\CIRepository D:\Projects\KenticoReferenceQA\CMS\App_Data\CIRepository

    This will create the CIRepostory folder in you website folder, now any changes made in this folder is mirrored in the project folder and detected by Visual Studio and your source control of choice.

    I have also added a post build script that triggers the powershell script to run continuous integration in the website. this will then update the website when you build.