Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure serialization location of Unicorn so the item are added to Visual Studio solution

I would like to get all items of Sitecore to get serialized in Visual Studio solution.

I know it can be configured to a absolute path. But each team member in the team has different VS solution path.

I am also planing to automate the process of adding the serialized items to database in build server. If anyone can provide instruction how to do it, that would be great. Jenkins is used for build.

like image 202
Damitha Avatar asked Oct 20 '22 05:10

Damitha


1 Answers

In the Unicorn 2 config file, app_Config\include\Serialization.config you found the path options. If you have the Sitecore Website and the VS solution in the same directory (it is not the Sitecore recommendation) than the Web-root-relative path works. Else each team member need use the same path structure.

<!-- 
Note the Serialization Provider's rootPath can be any of:
Absolute filesystem path, e.g. c:\foo\bar
Web-root-relative path, e.g. ~/data/serialization or ~/../out-of-root-serialization
"default", e.g. standard Sitecore serialization path
-->
                <serializationProvider type="Unicorn.Serialization.Sitecore.Fiat.FiatSitecoreSerializationProvider, Unicorn" rootPath="~/../../Serialization" singleInstance="true" />

You do not have to add the serialization files to your solution, just add them to your version system.

For deployment there are 2 options.

1) Create a package with Sitecore Courier, and use Sitecore.Ship or a script file. https://github.com/jbluemink/Sitecore-Scripted-Upgrade-Migrate-Content/tree/master/stap1 or this https://github.com/HedgehogDevelopment/UpdatePackageInstaller

2) Use Unicorn sync, just hit the URL see the documentation. https://github.com/kamsar/Unicorn

Publish the item use https://marketplace.sitecore.net/Modules/Parameter_driven_publish_deployment_tool.aspx

like image 192
Jan Bluemink Avatar answered Oct 23 '22 01:10

Jan Bluemink