How to Setup Continuous Integration With Git, Jenkins, and Force.com

Post on 10-May-2015

933 views 2 download

Tags:

description

Join us we walk through setting up a continuous integration system for Salesforce development, from scratch, using Git, Jenkins, the Force.com Migration Tool, and the Apex Data Loader, following a proven, step-by-step approach that you can use with your own project. You'll learn how to manage code using feature-specific sandboxes and feature-specific branches. We'll present the actual configuration scripts we use to make all this work for our group of eight developers, working together on the same managed product, spanning 65+ objects, 350+ classes, and 600+ Apex tests.

Transcript of How to Setup Continuous Integration With Git, Jenkins, and Force.com

How to Setup Continuous Integration

with Git, Jenkins, and Force.com

Derek Hansen, NimbleUser, Lead Engineer@nimblederek

Ted Husted, NimbleUser, Release Engineer@tedhusted

Safe harborSafe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.

Source code license - BSD2Copyright (c) 2013, NimbleUser

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or

other materials provided with the distribution.

Neither the name of NimbleUser nor the names of its contributors may be used to endorse or promote products derived from this software without

specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,

BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT

SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS

INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING

NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE

https://bitbucket.org/nimbleams/open-nu-devops

Derek HansenLead Engineer, NimbleUser@nimblederek

Ted HustedRelease Engineer, NimbleUser@tedhusted

http://www.salesforce.com/us/developer/docs/dev_lifecycle/salesforce_development_lifecycle.pdf

“It’s supposed to be automatic but you still have to press the button.”

"You can check-out any time like, but you can never leave!"

Good fences make good neighbors

That’s a wrap, people!

“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.”

Typical Branching Model

Git Feature Branches

Feature sandboxes

<bean id="RecordType-Extract-Sql" class = … ” singleton="true"> <property name="sqlString"> <value> INSERT INTO RecordType (Description, … ) VALUES (@Description@, … ) </value>

</property><property name="sqlParams">

<map> <entry key="Description" value="java.lang.String"/>

Deploy Data with Apex DataLoader

Check in what the IDE checks out

<project name="CI retrieval tasks" default="test" basedir="."

xmlns:sf="antlib:com.salesforce"> <property file="build.properties"/> <target name="retrieve"> <sf:retrieve username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" retrieveTarget="${sf.retrieveTarget}" packagenames="Nimble AMS" /> </target></project>

Retrieving Metadata with Ant

<project name="CI deployment tasks" default="test" basedir="."

xmlns:sf="antlib:com.salesforce"> <property file="build.properties"/> <target name="deploy"> <sf:deploy username="${sf.username.deploy}" password="${sf.password.deploy}" serverurl="${sf.serverurl.deploy}" deployRoot="${sf.deployRoot}"

autoUpdatePackage="true" maxPoll="60" packagenames="Nimble AMS"

/> </target></project>

Deploying Metadata with Ant

The Nimble Suite

The Nimble Suite + 1

Derek Hansen

Lead Engineer@nimblederek

Ted Husted

Release Engineer@tedhusted

All about NimbleUser

Nimble AMS is an enterprise Association Management System built by NimbleUser on Force.com. Nimble AMS revolutionizes the traditional AMS model with Chatter, Sites, Apps, Mobile, Social, and more.