0
votes

I am using Sitecore 6.6.0, we have multiple environments

  1. Local
  2. DEV
  3. QA
  4. PROD

I have to deploy few changes directly from Local to Prod (Don't ask me why directly to PROD, even if it is for QA, my question remains same), what I am doing is create a package on my local with all items and separately create folder structure for all files related to the fix an deploy that to PROD.

There is always a chance of human error, since I will have to remember all associated items and files for a fix, so is there a better automated way, which will not skip any changed Items or Files?

On the other note I am using Bit-bucket for source controlling sitecore code what about sitecore DBs? most of the sitecore developments stays in DBs. What is the best approach to source control sitecore DBs?

Update


Installed packages from nuget enter image description here

After installing Unicorn from nuget and unicorn.default.config, I get the following error

Attempt by method 'Unicorn.Data.DataProvider.UnicornDataProvider..ctor(Unicorn.Data.ITargetDataStore, Unicorn.Data.ISourceDataStore, Unicorn.Predicates.IPredicate, Rainbow.Filtering.IFieldFilter, Unicorn.Data.DataProvider.IUnicornDataProviderLogger, Unicorn.Data.DataProvider.IUnicornDataProviderConfiguration, Unicorn.Predicates.PredicateRootPathResolver)' to access method 'System.Action`1<System.__Canon>..ctor(System.Object, IntPtr)' failed.

Further after following the ReadMe on Github


When I do a sync on site/unicorn.aspx.

[P] Auto-publishing of synced items is beginning.
ERROR: Method not found: 'Sitecore.Publishing.Pipelines.Publish.PublishResult Sitecore.Publishing.Publisher.PublishWithResult()'. (System.MissingMethodException)
at Unicorn.Publishing.ManualPublishQueueHandler.PublishQueuedItems(Item triggerItem, Database[] targets, IProgressStatus progress) 
at Unicorn.Pipelines.UnicornSyncEnd.TriggerAutoPublishSyncedItems.Process(UnicornSyncEndPipelineArgs args) 
at (Object , Object[] ) 
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) 
at Unicorn.ControlPanel.SyncConsole.Process(IProgressStatus progress)

Solution:


For older sitecore versions (pre 7.2 iirc) you need to disable the auto publish config file as it relies on a method added later by sitecore.

https://github.com/kamsar/Unicorn/issues/103

2
Check out Team Development for Sitecore (TDS) teamdevelopmentforsitecore.com - Derek Hunziker
Automate the process there are a lot of tools en blogs about that. see sitecore.stockpick.nl/english/development-and-deployment for an overview. - Jan Bluemink
A good answer is far beyond the scope of Stackoverflow. But take a look at goblinrockets.com/2015/11/15/… for one possible automated CI/CD stack. - jammykam
Is it a good idea to get items with TDS and source control those? - HaBo
That's one option, you can also use Unicorn (github.com/kamsar/Unicorn). Read the links provided, they provide alternatives. - jammykam

2 Answers

0
votes

For Sitecore versioning and deployment Unicorn is also a good option.

https://github.com/kamsar/Unicorn

Cheers, Bo

1
votes

In order to track the database changes you are making, you will first need to install software that will be able to help you serialize your changes and store in source control. Team Development for Sitecore (TDS) and Unicorn are the two most popular options.

You will also want to make sure you have your own local database where you are making your changes so you can isolate those changes from your QA, PROD, etc. allowing you to maintain the same level of isolation you do for developing code.

Automation of this process helps reduce the human error you mention for the deployment by introducing a repeatable and known process. Here are a few blogs that can help you get started:

  1. Jason Bert - Continuous Deployment (Git/TDS/TeamCity)
  2. Jason St-Cyr - Automating with TeamCity and TFS (TFS/TDS/Team Build)
  3. Andrew Lansdowne - Auto deploy Sitecore Items using Unicorn and TeamCity (Unicorn/TeamCity)
  4. Brian Beckham - TDS and Build Configurations

You may also want to look into configuration transforms to support different values in your Sitecore Include patch files. SlowCheetah plugin will let create the transforms in Visual Studio (it might be in Visual Studio 2015 now...). TDS can pick up those transforms automatically and execute them on the build server for you, or you can do it with Visual Studio itself to create published packages.