Skip to content

versaagency/Sitecore.Octopus

 
 

Repository files navigation

Sitecore.Octopus

An amalgamation of various open source tools to help with continuous delivery of Sitecore sites using Octopus Deploy.

What it does:

  1. Generate Release notes form Resolved jira issues and github commmit's, since the last production release in octopus deploy for your project. You can then pass this txt file into Octopus Deploy for your new release. so you REALLY do know what is being deployed.

  2. Generate a .update package to be installed with Sitecore.Ship as part of your PostDeploy.ps1 script. The package of sitecore items is generated by comparing the current serilization folder with one that is tagged in the 'Github Releases'. ( There is a service for creatung the release in here as well).

3)Generates a ItemsToPublish.json file, which you can pass into sitecore.ship to publish the new items automatically as part of your PostDeploy.ps1 script

What it is:

It is a a Console app that you can call from your favourite scripting language (PSake example provided).

It will generate the following 3 files.

  1. ItemsToPublish.json ( for use with sitecore.ship )

  2. GeneratedContentPackage.update ( for use with sitecore.ship )

  3. ReleaseNotes.txt (for passing into Octopus Deploy)

How to use it:

  1. Seralize your content using [Unicorn] (https://github.com/kamsar/Unicorn)

  2. Check your serlizaed items into source control

  3. As part of your CI process, you need to create a sitecore .update package and itemsToPublish.json file containg sitecore items to deploy and publish. Generate these things by calling this (lovely) program.

  4. Create a "Release" in github of your serliazation items, so that you can do a diff agaist it in future.

  5. Include the generated .update snf itemsToPublish.json files in your nuget package you build for octopusDeploy.

  6. Pass the ReleaseNote.xt into Octopus when creating the release, usin the following Switch --releasenotesfile=VALUE

  7. In your Octopus PostDeploy.ps1 script, install the package using Sitecore.Ship. You can then publish the items by passing the itemsToPublish.json file into sitecore.ship as well.

  8. Sit back and enjoy your automated deployment process.

Psake Example:

task GenerateSitecorePackage {
     exec { & "$base_dir\Sitecore.Octopus.ContentPackageGenerator\bin\Debug\Sitecore.Octopus.ContentPackageGenerator.exe" "$source" "$packageDestination" "1e5b544554a5fbbb6d793721dc45fc2eca5439c9"}
}

Arguments are: seralization folder, Where you want package moved to, and git commit hash of current CI build ( can use GetCommitHash task example)

Prerequisites

Sitecore.Ship ( For installing and publishing content packages)

Unicorn ( For serializing content in the first place)

Octopus Deploy

JIRA account with API access ( You could disable this feature if not needed)

Github account with API access ( Although it is all behind an interface, so you could swap in a different provider)

PSake ( Optional - build script examples are provided in Psake. )

Contributing:

Pull requets wil most definatley be accepted. If you do submit a PR, please make sure you add tests proving that it works. Currently there is some hard coded paths in the unit tests ( I know), which means you need to checkout the solution to: C:\Projects\Sitecore.Octopus.

The integration tests are currently pointing at locked down Aqueduct Octopus, Git and JIRA api's..so you may need to tweak the appsettings.config file if you want to do something special.

You will also need to a folder to the root directory called SitecoreLibs, which should contain the folling files:

  1. Sitecore.Kernel.dl

  2. Sitecore.Logging.dll

  3. Sitecore.Update.dll

  4. Sitecore.Zip.dll

It is currently built against Sitecore 7.2, but it should work against any 6.4+ version of sitecore.

It is build using c# / .net 4.5.1 and has 100% code coverage! (although some tests could do with some better asserts)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 98.0%
  • PowerShell 2.0%