The Force.com Migration tool, GIT
and You
ANT and GIT: an offensive and defensive strategy for
Source Control Management
K...
Kyle Bowerman
Appirio / Cloudspokes TA
@kylebowerman
Just four commands can change you life!

ant
git
git
git

fetchmyorg
add .
commit –a –m ’auto commit’
push origin
Topics we will cover today
▪ANT (Force.com migration tool)

▪GIT

• Basic deploy
• Basic Fetch

• Git Concepts
• Bug fix e...
Ant for retrieve,

still just three files (defensive)

build.properties = login, password and serverurl
build.xml = what t...
Ant for deployment,

same three files (offensive)

build.properties = login, password and serverurl
package.xml = the mani...
What is GIT and why use it
▪ 3rd Generation
▪ Ubiquitous standard
▪ Highly distributed and easy
▪ Easy to branch, merge an...
Git concepts and commands
clone
remote
branch
fetch
pull
push

checkout
merge
add
commit
log
tag

pull:
brings down
push:
...
Daily snapshots: defensive example
ant
git
git
git

fetchmyorg
add .
commit –a –m ’auto commit’
push origin
Classic bug fix: offensive example
git clone http://github/user/reponame
git checkout –b issue49
change code and test
git ...
What you git
What you git
detail of a commit

• link to issue (github)
• commit message
• author and date
• summary of change
• diff of...
Two options for directory structures for salesforce.
com orgs
Use 1 branch per org
▪ SRC

Use a sub dir per org
▪ Orgs

▪ ...
Options for version numbering your release
Major.Minor.release#
Project.Feature.Sprint#.Hotfix#
Project.ApiVersion.model.r...
Git Cloud Repositories
▪ Github
• No free repos
• Industry standard for open source
• Wiki and Issue tracker
• Smart Commi...
Git GUIs:
All About Appirio and Cloudspokes
Appirio is a global service company that uses traditional
consulting, crowd sourcing and...
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”
port...
Manage Org Changes Using the Force.com Migration Tool and Git
Upcoming SlideShare
Loading in...5
×

Manage Org Changes Using the Force.com Migration Tool and Git

687

Published on

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.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
687
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
16
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Manage Org Changes Using the Force.com Migration Tool and Git

  1. 1. The Force.com Migration tool, GIT and You ANT and GIT: an offensive and defensive strategy for Source Control Management Kyle Bowerman, Appirio/Cloudspokes, Technical Architect @kylebowerman
  2. 2. Kyle Bowerman Appirio / Cloudspokes TA @kylebowerman
  3. 3. Just four commands can change you life! ant git git git fetchmyorg add . commit –a –m ’auto commit’ push origin
  4. 4. Topics we will cover today ▪ANT (Force.com migration tool) ▪GIT • Basic deploy • Basic Fetch • Git Concepts • Bug fix example ▪ Defensive SCM strategy • Monitor changes daily • Forensics tool ▪ Offensive SCM strategy • Release packages • Directory structures • Cloud repositories and Tools
  5. 5. Ant for retrieve, still just three files (defensive) build.properties = login, password and serverurl build.xml = what to do Unpackge-all.xml = what to get (supports * wildcards) Ant fetchdev3
  6. 6. Ant for deployment, same three files (offensive) build.properties = login, password and serverurl package.xml = the manifest (what to deploy) build.xml = the instructions of what to do <target>
  7. 7. 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
  8. 8. Git concepts and commands clone remote branch fetch pull push checkout merge add commit log tag pull: brings down push: latest src repo fetch: brings down latest src from repo to HEAD puts latest and merges commit into it into current repo branch branch: Local copies the master branch clone: gets the code from the remote, do once
  9. 9. Daily snapshots: defensive example ant git git git fetchmyorg add . commit –a –m ’auto commit’ push origin
  10. 10. Classic bug fix: offensive example git clone http://github/user/reponame git checkout –b issue49 change code and test git commit –a –m ‘fixed issue #49’ git checkout master git merge issue49 git push origin
  11. 11. What you git
  12. 12. What you git detail of a commit • link to issue (github) • commit message • author and date • summary of change • diff of each change • detail of each file
  13. 13. Two options for directory structures for salesforce. com orgs Use 1 branch per org ▪ SRC Use a sub dir per org ▪ Orgs ▪ packages • Prod/SRC ▪ docs • Dev/SRC ▪ data ▪ scripts ▪ readme.md ▪ build.xml ▪ unpackage-all.xml • Testing/SRC ▪ docs ▪ packages ▪ data ▪ readme.md ▪ build.xml
  14. 14. Options for version numbering your release Major.Minor.release# Project.Feature.Sprint#.Hotfix# Project.ApiVersion.model.release# 1.2.31 1.0.6.1 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.
  15. 15. 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
  16. 16. Git GUIs:
  17. 17. 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
  18. 18. Kyle Bowerman Technical Architect @kylebowerman
  19. 19. 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
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×