Blog

Created an open source VSTS build & release task for Sitecore.Ship

03 Jan, 2017
Xebia Background Header Wave

At my current customer we’re implementing an Azure environment which also contains a Sitecore application. We’re using VSTS to for all aspects of the application development lifecycle from agile planning to source control and automated builds & releases. In the release pipeline we can use the out of the box Azure web deploy build steps to deploy our code to our web app which is a Sitecore instance. The next step is to be able to also deploy the Sitecore content we created as code using TDS to our Sitecore Site.

Sitecore.Ship is an open source project which makes it easy to deploy Sitecore .Update files to your Sitecore Instance. It is created by Kevin Obee and it can be found here on Github

in our Build we build our TDS projects using MSBuild to generate .Update files which we can then deploy in our release pipeline to Sitecore. There was one problem however which was that there was no build task to do this. Since my role at my current client is supporting all the development teams in improving their continuous delivery process i decided to create a task to make their life easier.

sitecoreship

Sitecore.Ship build task

You can download the build task now in the VSTS marketplace.

To be able to upload your .update files using Sitecore.Ship you have to install Sitecore.Ship on your Sitecore instance first. when you’ve done that don’t forget to whitelist the IP address of your build server in the web.config so Sitecore.Ship will allow your build server to do the deployment.

After that add my Sitecore Ship VSTS task to your workflow, select the .update file and the URL of your Sitecore site and you’re done.

The task works for both VSTS and TFS 2015/2017 and works for your sitecore site hosted on prem or in Azure.

2

Open Source

Of course this VSTS task is open source and the source can be found here on Github

the tasks is uploading the sitecore packages through powershell. even if you are not using powershell you might want to use this piece of powershell if you want to upload things to Sitecore using Sitecore.Ship manually. The script is quite basic setting up a httpclient that sends the files to Sitecore through http Post.

If you want to run the powershell script manually you have to replace to 2 lines that retrieve the parameters from the build task to parameters that are sent to the script.

This is the first VSTS build task i’ve created so please let me know if you like it or if you have feedback in improving this task by leaving a comment here or on Github.

also check out one of the many other VSTS build tasks made by my colleagues from Xpirit

Happy deploying!

Geert van der Cruijsen

The post Created an open source VSTS build & release task for Sitecore.Ship appeared first on Mobile First Cloud First.

Questions?

Get in touch with us to learn more about the subject and related solutions

Explore related posts