Upload
salesforce-developers
View
547
Download
3
Embed Size (px)
DESCRIPTION
Join us to learn how the Force.com Migration Tool is a powerful instrument for deploying code and configuring salesfoce.com. The Ant-based tool offers the ability to take a snapshot of your code and configuration, which you can then store in any source code management system such as Git. These snapshots can be used to restore, in part or in whole, your org to a previous state. In addition to recovery, if we stack these snapshots we can use them for forensic purposes to find when a Salesforce environment changed.
Citation preview
The Force.com Migration tool, GIT and YouANT and GIT: an offensive and defensive strategy for Source Control ManagementKyle Bowerman, Appirio/Cloudspokes, Technical Architect@kylebowerman
Kyle BowermanAppirio / Cloudspokes TA@kylebowerman
Just four commands can change you life!
ant fetchmyorggit add .git commit –a –m ’auto commit’git push origin
Topics we will cover today
▪ Defensive SCM strategy• Monitor changes daily• Forensics tool
▪ Offensive SCM strategy • Release packages• Directory structures• Cloud repositories and Tools
▪GIT• Git Concepts• Bug fix example
▪ANT (Force.com migration tool)• Basic deploy• Basic Fetch
Ant for retrieve, still just three files (defensive)build.properties = login, password and serverurlbuild.xml = what to doUnpackge-all.xml = what to get (supports * wildcards)
Ant fetchdev3
Ant for deployment, same three files (offensive)build.properties = login, password and serverurlpackage.xml = the manifest (what to deploy)build.xml = the instructions of what to do <target>
What is GIT and why use it
▪ 3rd Generation▪ Ubiquitous standard▪ Highly distributed and easy▪ Easy to branch, merge and audit▪ Cloud repos offer additional services like issue tracking and wiki
git clone https://github.com/forcedotcom/aura.git
Git concepts and commands
cloneremotebranchfetchpullpush
checkoutmerge addcommitlogtag
clone: gets the code from the remote, do once
repo
Localbranch: copies the master branch
fetch: brings down latest src from repo to HEAD
pull: brings down latest src and merges it into current branch
push: puts latest commit into repo
Daily snapshots: defensive example
ant fetchmyorg git add . git commit –a –m ’auto commit’ git push origin
Classic bug fix: offensive example
git clone http://github/user/reponamegit checkout –b issue49 change code and testgit commit –a –m ‘fixed issue #49’git checkout mastergit merge issue49git push origin
What you git
What you gitdetail of a commit
• link to issue (github) • commit message• author and date• summary of change• diff of each change• detail of each file
Two options for directory structures for salesforce.com orgs
Use 1 branch per org▪ SRC▪ packages▪ docs▪ data▪ scripts▪ readme.md▪ build.xml▪ unpackage-all.xml
Use a sub dir per org▪ Orgs
• Prod/SRC• Dev/SRC• Testing/SRC
▪ docs▪ packages▪ data▪ readme.md▪ build.xml
Options for version numbering your release
Major.Minor.release# 1.2.31Project.Feature.Sprint#.Hotfix# 1.0.6.1Project.ApiVersion.model.release# 2.29.14.27
You can use any versioning schema you want or create you own. The important thing is that everyone understands what each digit means, and you have a release note for each release.
Git Cloud Repositories▪ Github
• No free repos• Industry standard for open source• Wiki and Issue tracker• Smart Commits
▪ Bitbucket• Unlimited private repos (but only 5 users)• From Atlassian• Side by side diffs
Git GUIs:
All About Appirio and Cloudspokes
Appirio is a global service company that uses traditional consulting, crowd sourcing and cloud, social and mobile technology to help enterprises dramatically improve the way they do business.
Cloudspokes is Appirio’s crowd sourcing business unit. With it’s recent acquisition of TopCoder.com, it provides a resource of nearly 600k developers world wide to provide customer solutions
Kyle Bowerman
Technical Architect@kylebowerman
We want to hear from YOU!
Please take a moment to complete our session survey
Surveys can be found in the “My Agenda” portion of the Dreamforce app