Rapid real-world testing using git-deploy
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
FOSDEM – February 5, 2012
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
FOSDEM – February 5, 2012
We've gone from deployments being a hard manual process, to doing dozens of them a day.
git
pull/commit/cherry-pick/reset
).
.git/deploy/lock
file in your
deployment repository.
git pull
for you.
# checks that we're on "master" cron/pre-start.001_nobranch_rollout.pl
git pull
and the start hooks.
I'm sorry Dave, I'm afraid I can't do that
$ git-deploy start # INFO : Starting step 'start' at 2012-02-02 16-22-01 # FATAL: You may not start a new rollout as it looks like one is already in progress! # FATAL: Failed to create lock dir '.git/deploy' because 'File exists' # FATAL: Log: # FATAL: start: 2012-02-02 16:19:28 trunk 110bc23d8204dae87b2af259a02d47cd08711589 717 slanning
$ git-deploy start # INFO : Starting step 'start' at 2012-02-02 16-30-12 # INFO : Working directory was checked out to tag 'app-20120202-160118', will restore this tag on abort # INFO : Step 'start' concluded at 2012-02-02 16:30:12 took 29 seconds to complete # YAY : 'start' for 'app' completed successfully
$ git-deploy status # NOTE : app rollout started - not synced yet (app-20120202-160118) # NOTE : start: 2012-02-02 16:30:12 trunk 639022c78daf1b85b76d4816803a6d37bef67e10 3374 aearnfjord
prefix-YYYYMMDD-HHMMSS
OMGWTFBBQ we're spewing errors
$ git-deploy revert # INFO : Starting step 'revert' at 2012-02-03 12-09-50 # INFO : Working directory was checked out to tag 'frob-20120203-111220', will restore this tag on abort # INFO : The following commits are available to revert the site to: # INFO : Filtering list by m/^frob/ (use `git-deploytool show .` to see all). # INFO : SHA1........ tag: PREFIX-YYYYMMDD-HHMM == Original rollout of same sha1 # INFO : Tags against active commit are marked with a '*' and are highlighted differently 1. ac6152d369 *tag: frob-20120203-111220 == office-20120203-110941 2. 639022c78d tag: frob-20120202-160118 3. fc29e97c43 tag: frob-20120202-132719 4. 77b932ea11 tag: frob-20120201-164625 5. f2ffb24388 tag: frob-20120201-163350 == book-20120201-162541 6. a7bf6eb7c8 tag: frob-20120201-140814 7. ee728fa093 tag: frob-20120201-110816 == frob-20120131-145422 frob-20120131-121103 frob-20120130-171544 frob-20120130-121126 8. cb3189bf21 tag: frob-20120201-105349 == admin-20120201-103938 9. ee728fa093 tag: frob-20120131-145422 == frob-20120131-121103 frob-20120130-171544 frob-20120130-121126 10. e987ca15e1 tag: frob-20120131-143318 # INFO : Showing first 10, *bignum* of *bignum* not shown (111 filtered). Use --count=N or different filter to show more (N=0 shows all) Please select a commit from 1-10 to revert to, or 'quit' to not do anything: quit
git-config(1)
git push
Debian
or RPM
package out
of it.