Skip to content
This repository was archived by the owner on Dec 6, 2019. It is now read-only.

Commit

Permalink
[#474] Unicorn upgrade to support 9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nickwesselman committed Aug 1, 2019
1 parent e3fd08e commit c584274
Show file tree
Hide file tree
Showing 14 changed files with 88 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
http://github.com/kamsar/Unicorn
-->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentManagement">
<sitecore role:require="Standalone or ContentManagement">
<pipelines>
<unicornSyncComplete>
<!-- at the end of each configuration's sync, we throw the items it changed into ManualPublishQueueHandler's queue -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
NOTE: if you do not alter the default values you can remove this entirely and use the defaults set in Unicorn.Users.config

removeOrphans:
If you set RemoveOrphans to true, role syncing will delete matching roles that are not serialized, like item syncing does.
If set to false, roles are only ever added or updated (similar to New Items Only item syncing but updates are also synced)
If you set RemoveOrphans to true, user syncing will delete matching users that are not serialized, like item syncing does.
If set to false, users are only ever added or updated (similar to New Items Only item syncing but updates are also synced)

defaultPassword:
When NEW users are deserialized, their passwords will be set to this value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

See Unicorn.config for commentary on how configurations operate, or https://github.com/kamsar/Unicorn/blob/master/README.md
-->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore>
<unicorn>
<configurations>
Expand Down Expand Up @@ -65,7 +65,38 @@
<include database="master" path="/sitecore/system/Workflows" />
<include database="master" path="/sitecore/system/Settings" />
</predicate>


<!--
PREDICATE AND INCLUDE FIELD TRANSFORMS

- These transforms ONLY APPLY to what gets deserialized into Sitecore. Field values on disk/serialized datastore remain complete - respecting only the Rainbow field filter settings

IN OTHER WORDS:

Example: "-title, -text, +ApiUrl[{$apiUrlToken$}]" => All fields get deployed as normal, except "title" and "text". And "ApiUrl" gets a forced value.
Example: "!title, -text" => "Title" gets reset (to standard value), "Text" gets ignored.
Example: "?title, ?text" => ALL fields gets deployed, but fields "Title" and "Text" will only get their value deployed if target field value is empty
Example: "?title, ?text, !apiUrl" => As above, but field "apiUrl" is reset

"!field" => Reset this field unconditionally
"-field" => Ignore this field unconditionally
"?field" => Deploy this field if it has no value in target data store (Sitecore)
"+field[value]" => Force a new value into this field on target data store (Sitecore)
";field" => Force a "Lorem ipsum dolor" value into the field
":field" => Force a longer Lorem ipsum based HTML string into the field (around 2075 characters of Lorem Ipsum, broken up with <p> into sentences).
"$field[settingName]" => Grab the value of the Sitecore Setting `settingName` and force it as a value
-->
<predicate fieldTransforms=";Title,:Text,!Include In Sitemap,+Api Endpoint[{$apiEndPoint$}],?Default Product">
<include name="Sample Data" database="master" path="/sitecore/content/global/sample" fieldTransforms="-Title" /> /* Predicate transforms apply, but "Title" gets ignored on this include definition */
</predicate>


<!-- Clear Workflow fields on local development environments, but force a specific state upstream -->
<predicate>
<include role:require="Standalone" name="Sample Data" database="master" path="/sitecore/content/global/sample" fieldTransforms="!Workflow,!Workflow State" />
<include role:require="ContentManagement" name="Sample Data" database="master" path="/sitecore/content/global/sample" fieldTransforms="+Workflow[{2DE02B52-B95F-404A-A955-C36B290F1B57}],+Workflow State[{5ACE9C7F-8A18-4C77-BC30-03BE5A40E6B6}]"/>
</predicate>

<!--
SYNC TYPE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
http://github.com/kamsar/Unicorn
-->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentManagement">
<sitecore role:require="Standalone">
<dataProviders>
<!--
Register the Unicorn data provider for use. If a database hooks to the Unicorn data provider it will
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
http://github.com/kamsar/Unicorn
-->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentManagement">
<sitecore role:require="Standalone or ContentManagement">
<unicorn>
<defaults>
<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
http://github.com/kamsar/Unicorn
-->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentManagement">
<sitecore role:require="Standalone or ContentManagement">
<powershell>
<commandlets>
<add Name="Unicorn Commandlets" type="*, Unicorn" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
http://github.com/kamsar/Unicorn
https://github.com/BerserkerDotNet/Unicorn.VisualStudio
-->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentManagement">
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<unicornControlPanelRequest>
<processor type="Unicorn.ControlPanel.VisualStudio.Pipelines.UnicornControlPanelRequest.VSSyncVerb, Unicorn" patch:after="processor[1]" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
http://github.com/kamsar/Unicorn
-->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentManagement">
<sitecore role:require="Standalone">
<events>
<event name="role:created">
<handler type="Unicorn.Roles.Events.UnicornRolesEventHandler, Unicorn.Roles" method="RoleCreated" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
http://github.com/kamsar/Unicorn
-->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentManagement">
<sitecore role:require="Standalone or ContentManagement">
<unicorn>
<defaults>
<!-- Note: do not colocate serialized items and serialized roles in the same folder -->
<roleDataStore physicalRootPath="$(dataFolder)\Unicorn\Unicorn.Roles\$(configurationName)" type="Unicorn.Roles.Data.FilesystemRoleDataStore, Unicorn.Roles" singleInstance="true"/>
<roleLoader type="Unicorn.Roles.Loader.RoleLoader, Unicorn.Roles" singleInstance="true" />
<roleLoaderLogger type="Unicorn.Roles.Loader.DefaultRoleLoaderLogger, Unicorn.Roles" singleInstance="true" />
<roleLoaderLogger type="Unicorn.Roles.Loader.DefaultRoleLoaderLogger, Unicorn.Roles" singleInstance="true" />

<roleSerializationFormatter type="Unicorn.Roles.Formatting.YamlRoleSerializationFormatter, Unicorn.Roles" singleInstance="true" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
http://github.com/kamsar/Unicorn
-->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentManagement">
<sitecore role:require="Standalone or ContentManagement">
<unicorn>
<!--
Authentication Provider
Expand Down Expand Up @@ -47,17 +47,21 @@
<httpRequestBegin>
<!--
This pipeline handler shows the Unicorn control panel. You can customize the URL the control panel lives at by changing the activationUrl.
On Sitecore 9.1 and above, you must also update the site neutral paths in the owin.cookieAuthentication.validateIdentity pipeline defined in
Unicorn.UI.IdentityServer.config when you customize the control panel URL.
The activationUrl must be a URL that the Sitecore pipeline won't ignore (e.g. .aspx, .ashx, etc)
The activationSite must be a site that doesn't use Language Fallback or Enforce Version Presence
-->
<processor patch:after="*[@type='Sitecore.Pipelines.HttpRequest.UserResolver, Sitecore.Kernel']" type="Unicorn.ControlPanel.UnicornControlPanelPipelineProcessor">
<param desc="activationUrl">/unicorn.aspx</param>
<param desc="activationSite">unicorn</param>
</processor>
</httpRequestBegin>
<filterItem>
<processor patch:before="*[@type='Sitecore.Pipelines.FilterItem.CheckIfFilteringIsActive, Sitecore.Kernel']" type="Unicorn.ControlPanel.CheckIfFilterDisablerIsActive, Unicorn" />
</filterItem>
<getContentEditorWarnings>
<processor type="Unicorn.UI.Pipelines.GetContentEditorWarnings.SerializedWarning, Unicorn"/>
<processor type="Unicorn.UI.Pipelines.GetContentEditorWarnings.SerializedWarning, Unicorn" />
</getContentEditorWarnings>

<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
http://github.com/kamsar/Unicorn
-->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentManagement">
<sitecore role:require="Standalone">
<events>
<event name="user:created">
<handler type="Unicorn.Users.Events.UnicornUsersEventHandler, Unicorn.Users" method="UserCreated" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
http://github.com/kamsar/Unicorn
-->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentManagement">
<sitecore role:require="Standalone or ContentManagement">
<unicorn>
<defaults>
<!-- Note: do not colocate serialized items and serialized users in the same folder -->
<userDataStore physicalRootPath="$(dataFolder)\Unicorn\Unicorn.Users\$(configurationName)" type="Unicorn.Users.Data.FilesystemUserDataStore, Unicorn.Users" singleInstance="true"/>
<userLoader type="Unicorn.Users.Loader.UserLoader, Unicorn.Users" singleInstance="true" />
<userLoaderLogger type="Unicorn.Users.Loader.DefaultUserLoaderLogger, Unicorn.Users" singleInstance="true" />
<userLoaderLogger type="Unicorn.Users.Loader.DefaultUserLoaderLogger, Unicorn.Users" singleInstance="true" />

<userSerializationFormatter type="Unicorn.Users.Formatting.YamlUserSerializationFormatter, Unicorn.Users" singleInstance="true" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

http://github.com/kamsar/Unicorn
-->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentManagement">
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<unicorn>
<!--
Configurations
Expand Down Expand Up @@ -76,7 +76,7 @@
<fieldFormatter type="Rainbow.Formatting.FieldFormatters.CheckboxFieldFormatter, Rainbow" />
</serializationFormatter>

<deserializer type="Unicorn.Deserialization.UnicornDeserializer, Unicorn" singleInstance="true" />
<deserializer type="Unicorn.Deserialization.UnicornDeserializer, Unicorn" ignoreBranchId="true" singleInstance="true" />
<deserializerLogger type="Unicorn.Deserialization.DefaultDeserializerLogger, Unicorn" singleInstance="true"/>

<evaluator type="Unicorn.Evaluators.SerializedAsMasterEvaluator, Unicorn" singleInstance="true"/>
Expand Down Expand Up @@ -169,7 +169,13 @@
<!-- Run after an individual configuration completes sync. Handlers should implement IUnicornSyncCompleteProcessor -->
<unicornSyncComplete>
<processor type="Unicorn.Pipelines.UnicornSyncComplete.DictionaryCacheClearer, Unicorn" />
<processor type="Unicorn.Pipelines.UnicornSyncComplete.SyncedItemPostProcessor, Unicorn" />
<processor type="Unicorn.Pipelines.UnicornSyncComplete.SyncedItemPostProcessor, Unicorn">
<!--
Set this to "true" if you are experiencing odd behaviour when syncing a large number of configurations.
It will hurt performance significantly however.
-->
<UnconditionalCacheClearing>false</UnconditionalCacheClearing>
</processor>
<processor type="Unicorn.Pipelines.UnicornSyncComplete.SyncCompleteLogger, Unicorn" />
</unicornSyncComplete>

Expand Down Expand Up @@ -206,5 +212,14 @@
<!-- Prevent fake 'overwrite?' warnings when using transparent sync due to how it handles revisions -->
<request patch:instead="*[@name='ExperienceEditor.Save.CheckRevision']" name="ExperienceEditor.Save.CheckRevision" type="Unicorn.ExperienceEditor.Speak.Ribbon.Requests.SaveItem.TransparentSyncAwareCheckRevision, Unicorn"/>
</sitecore.experienceeditor.speak.requests>

<sites>
<!-- A controlled site context to run Unicorn sync processes in, where we know Language Fallback features and other misguidings are inactive -->
<site name="unicorn"
inherits="shell"
enableItemLanguageFallback="false"
enableFieldLanguageFallback="false"
enforceVersionPresence="false" />
</sites>
</sitecore>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,23 @@
<PackageReference Include="Microsoft.Net.Compilers" Version="1.3.2" />
<PackageReference Include="Microsoft.Web.Infrastructure" Version="1.0.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Rainbow" Version="2.0.0" />
<PackageReference Include="Rainbow.Core" Version="2.0.0" />
<PackageReference Include="Rainbow.Storage.Sc" Version="2.0.0" />
<PackageReference Include="Rainbow.Storage.Yaml" Version="2.0.0" />
<PackageReference Include="Rainbow" Version="2.1.1" />
<PackageReference Include="Rainbow.Core" Version="2.1.1" />
<PackageReference Include="Rainbow.Storage.Sc" Version="2.1.1" />
<PackageReference Include="Rainbow.Storage.Yaml" Version="2.1.1" />
<PackageReference Include="System.ComponentModel" Version="4.0.1" />
<PackageReference Include="System.Diagnostics.Debug" Version="4.0.11" />
<PackageReference Include="System.Globalization" Version="4.0.11" />
<PackageReference Include="System.Linq" Version="4.1.0" />
<PackageReference Include="System.Linq.Expressions" Version="4.1.0" />
<PackageReference Include="System.Reflection" Version="4.1.0" />
<PackageReference Include="System.Resources.ResourceManager" Version="4.0.1" />
<PackageReference Include="Unicorn" Version="4.0.3" />
<PackageReference Include="Unicorn.Core" Version="4.0.3" />
<PackageReference Include="Unicorn.Roles" Version="4.0.3" />
<PackageReference Include="Unicorn.Roles.Core" Version="4.0.3" />
<PackageReference Include="Unicorn.Users" Version="4.0.3" />
<PackageReference Include="Unicorn.Users.Core" Version="4.0.3" />
<PackageReference Include="Unicorn" Version="4.1.1" />
<PackageReference Include="Unicorn.Core" Version="4.1.1" />
<PackageReference Include="Unicorn.Roles" Version="4.1.1" />
<PackageReference Include="Unicorn.Roles.Core" Version="4.1.1" />
<PackageReference Include="Unicorn.Users" Version="4.1.1" />
<PackageReference Include="Unicorn.Users.Core" Version="4.1.1" />
</ItemGroup>
<Choose>
<When Condition="'$(LocalReferences)' == 'true'">
Expand Down Expand Up @@ -176,11 +176,11 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

0 comments on commit c584274

Please sign in to comment.