Sofia Event Center May 2014 Branimir Giurov C# MVP Solution Architect BulPros Consulting Continuous Integration of Sharepoint 2013 Solutions with VS 2013 and Visual Studio Online
Agenda What is CI CI Principles CI Advantages/Disadvantages CI Process CI in.NET – tools CI with Sharepoint 2013 – HowTo Build process (customized) Configuration and deployment Integration testing
What is Continuous Integration? From Wikipedia: “ Continuous integration (CI) is the practice, in software engineering, of merging all developer working copies with a shared mainline several times a day.” Continuous integration Named and proposed as part of extreme programming (XP) Prevents Integration problems BDC few times per day
CI Principles Maintain a code repository Automate the build Make the build self-testing Everyone commits to the baseline every day Every commit must be built Keep the build fast Test in a clone of production environment Make it easy to get latest deliverables Everyone can see the result of the latest build Automate deployment
CI Advantages/Disadvantages Advantages When test fails, you know what’s broken Continuous fixing of integration bugs Early warning of broken/incompatible code Immediate unit testing of all changes Constant availability of build for testing Immediate feedback to developers on quality of the build Frequent check-ins pushes developers to create more modular and less complex code Metrics from automated testing provide immediate feedback about multiple performance areas Disadvantages Initial setup might take longer
CI Process Every check-in should be integration-tested Check-in policy Run build Execute unit tests(optional) For larger source trees Rolling build Gated check-ins Shelve-build-test-check-in – verify merge before check-in
CI in.NET - tools In the past – pre-Visual Studio 2010: NAnt Visual Source Safe, Vault, SVN, TFS Cruise Control.NET/TFS PSExec from SysInternals Now MSBuild TFS TFS Source control/Git TFS Build
CI in Sharepoint Requirements
My Requirements Implement CI Use existing CI Streamline deployment and configuration Test/UAT PowerShell scripts for configuration of environment and environment settings Make use of my laptop (for on premise deployments) Local development, remote deployment Gated check-in will trigger deployment to a VM in Azure
CI in Sharepoint 2013 Demo CI Custom build template Gated check-ins Client Sharepoint development
Tools & Resources Azure remote PS Execution: line-access-to-azure-vms-powershell-remoting.aspxhttp://blogs.msdn.com/b/mariok/archive/2011/08/08/command- line-access-to-azure-vms-powershell-remoting.aspx Psexec from SysInternals Sharepoint Solution Deployerhttps://spsd.codeplex.com/ - CKS Deployment editionhttps://cksdev.codeplex.com/ - output wsp from msbuildhttp://msdn.microsoft.com/en-us/library/ff aspx
Agenda What is CI CI Process CI in.NET – tools CI with Sharepoint 2013 – HowTo Build process (customized) Configuration and deployment Integration testing
Questions??? Share your feedback for this particular session and for the overall conference experience at for a chance to win our prizes!