This document discusses Git, Jenkins, and Rex in the context of continuous integration and delivery. It provides an overview of what each tool is and how they can work together. Git is used for version control and tracking changes. Jenkins monitors Git repositories for new commits and triggers automated builds. Rex is a tool that can be used by Jenkins to deploy builds to different environments and server groups. The document outlines how developers would use Git and how Jenkins would integrate with Git to build, test, and deploy code changes.
4. What Is Jenkins?
¡ñ You can let Jenkins type for you the way you
want it to be
5. Git+Jenkins
¡ñ Just like SVN+Jenkins
¡ñ Authentication
¨C Public key: /home/user/.ssh/id_rsa.pub
¨C Private key: /home/user.ssh/id_rsa
6. Git from developer PoV
¡ñ Get the working copy
git clone git@github.com:twitter/bootstrap.git
git clone https://github.com/twitter/bootstrap.git
git clone git://github.com/twitter/bootstrap.git
¡ñ Select branch
git checkout master
¡ñ Create a new working branch
git checkout -b PRODUCTBACKLOG-2000 master
git checkout -b <NEW_BRANCH> <REFERENCE_BRANCH>
git checkout -b <NEW_BRANCH> #default is current branch
7. Git from developer PoV
¡ñ Commit changes
git commit
git commit -m
git commit -a -s
¡ñ Rebase
¡°Put your local changes as the latest changes from
the rebasee branch on your local working copy¡±
8. Rebase
¡ñ Put your local changes as the latest changes
of the universe.
¨C You have the latest status of the collaboration
branch.
¨C Your change is just an addition, won't conflict to
others'.
¨C Safer than merge
¨C http://mislav.uniqpath.com/2013/02/merge-vs-
rebase/
10. Git from Jenkins PoV
¡ñ Our Jenkins deploys from feature branch, NOT
from integration branch
¡ñ Not from master
¡ñ Not from origin/master
¡ñ Why? We need it
¡ñ We don't maintain build history since the
branch is inconsistent in every build
11. Git from Jenkins PoV
¡ñ Build is parameterized
¨C Branch's name
¨C Target server
¡ñ Always checkout a new copy
¡ñ git checkout -b b-XyZ-PRODUCTBACKLOG-2000 origin/PRODUCTBACKLOG-2000
¡ñ Build
¡ñ Deploy to target server
12. Rex
¡ñ An instrument to build and deploy
¡ñ We have several groups of servers
¨C They have different purpose
¨C Different version of code
¨C Different user
¡ñ http://rexify.org
¡ñ deploy/Rexfile
13. How To Rex?
¡ñ rex -T
¡ñ rex -E integration do_deploy ¨Ctarget=platform
¡ñ rex -E staging do_deploy ¨Ctarget=th
¡ñ Relax, it's all done by Jenkins.