View
205
Download
1
Embed Size (px)
DESCRIPTION
Continuous Integration is a wonderful and popular practice in the software development universe. Yet, for whatever reason, it seems much less commonly utilized in the SharePoint community. SharePoint (naturally) throws a few wrinkles into the process, but no substantial roadblocks, and the benefits of CI can be realized just as well on SharePoint projects as anywhere else. In this session, you'll learn why you should implement a CI process and then see how to do it using TFS and Visual Studio.
Citation preview
Improving the SharePoint Development Process with Continuous IntegrationRobert Hiskey
SPS NJ 2014
About MePortals & Collaboration Consultant @ Slalom Consulting
Web Developer
Working with SharePoint since 2008
User Experience and Project Management @HollywoodHiskey
http://www.linkedin.com/in/roberthiskey
AgendaOverview of Continuous Integration (CI)
Foundations of CI
CI Process Components
Project Setup
Build Configuration
Unit Testing
Demo
Continuous IntegrationWhat is it, why use it, and when is it most effective?
What is Continuous Integration?A complete process that includes:
Task management
Source control
Unit testing
Automated builds
Automated deployments
Stable test environments
Reporting/communication
What are the benefits?Organization/prioritization of work
Increased development efficiency
Improved quality
Reduced overhead
More frequent test cycles
Trusted test results
When can CI be leveraged?On any development project (at least partially)
Indicators that you should be using a CI process:
Multiple developers
Medium/Long-term projects
Frequent QA/UAT builds
Complex codebases
CI FoundationsTask management, source control, and deployment scheduling.
Task ManagementImplementing other aspects of CI without a good system for managing work might only make things worse!
Important to know:
What changes were included in the latest build?
Which new features were included in the last deployment?
What (and who) caused the build to fail?!
Best Practice: Every check-in should be associated with a clear, granular item/task.
Source ControlWhen part of a CI process, source control is more than just a code repository
Design and configure the source control system to match the needs of each project
Branches and labels
File locking
Check-in process
Build triggers are set for individual branches
Best Practice: Each branch should represent a release (not a server!)
Deployment SchedulingFrequent deployments are essential to the CI process, but it’s possible to be too agile
Multiple factors help determine the ideal schedule:
Number of test environments
Sprint duration
Testing process and duration
Best Practice: “True” CI for Integration environments, regularly scheduled deployments for Staging environments.
CI ComponentsImplementing a CI process from scratch.
Project SetupCreate a team project
Explanation of Process Templates
Add work items and tasks
Open project in Visual Studio
Build ConfigurationStart from the Builds tab in Team Explorer view
Create a new build definition!
Trigger (Build Triggers Explained)
Build Controller
Process
Best Practice: Make build outcome dependent on unit tests.
Unit TestingUnit testing of .NET code is straightforward, out of the box
JavaScript unit testing can also be integrated with a build using additional tools
Qunit – JavaScript unit testing framework
Chutzpah – JavaScript test runner with Visual Studio extensionIntegrating Chutzpah with TFS
Automated DeploymentConfigure a build definition to execute a command upon successful completion
PowerShell!SharePoint 2010 with Windows PowerShell Remoting Step by Step
What about SharePoint Online? SharePoint Online Management Shell
Client-side SharePoint PowerShell
Complexity of automation varies by solutionSimple WSP deployment, or do specific features need to be activated?
Should the same deployment steps occur every time?
For some projects, automated builds (without deployment) may be enough
Thank you!Please submit a speaker evaluation (forms at front).
Let’s talk at SharePint!Harvest Moon Brewery
392 George Street
New Brunswick, NJ 08901
Twitter: @HollywoodHiskey
E-mail: [email protected]