I want all Sitecore elements to be serialized in a Visual Studio solution.
I know that it can be set to the absolute path. But each team member in the team has a different way of solving VS.
I also plan to automate the process of adding serialized elements to the database on the build server. If anyone can provide instructions on how to do this, that would be great. Jenkins is used for assembly.
In the Unicorn 2 configuration file app_Config \ include \ Serialization.config, you found the path parameters. If you have a Sitecore site and a VS solution in the same directory (this is not a Sitecore recommendation), how does the Internet-based path work. In addition, each team member must use the same path structure.
<!-- Note the Serialization Provider rootPath can be any of: Absolute filesystem path, eg c:\foo\bar Web-root-relative path, eg ~/data/serialization or ~/../out-of-root-serialization "default", eg standard Sitecore serialization path --> <serializationProvider type="Unicorn.Serialization.Sitecore.Fiat.FiatSitecoreSerializationProvider, Unicorn" rootPath="~/../../Serialization" singleInstance="true" />
You do not need to add serialization files to your solution, just add them to your version.
There are 2 options for deployment.
1) Create a package using Sitecore Courier and use the Sitecore.Ship file or script. https://github.com/jbluemink/Sitecore-Scripted-Upgrade-Migrate-Content/tree/master/stap1 or https://github.com/HedgehogDevelopment/UpdatePackageInstaller
2) Use Unicorn sync, just click the url in the documentation. https://github.com/kamsar/Unicorn
Posting an item is used https://marketplace.sitecore.net/Modules/Parameter_driven_publish_deployment_tool.aspx
This is what we have finally implemented.
Use below powershell script with jenkins.
$ url = ' http: //yoursite/unicorn.aspx? verb = Sync '
$ deploymentToolAuthToken = 'auth-token'
$ result = Invoke-WebRequest -Uri $ url -Headers @ {"Authenticate" = $ deploymentToolAuthToken} -TimeoutSec 10800 -UseBasicParsing