Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
```
sudo gem install git-deploy
git remote add production scabot@scabot:/home/scabot/scabot
git deploy setup -r "production"
```

I think this may be needed: `ssh scabot 'cd /home/scabot/scabot && git checkout master'`.

`runit` etc is configured for scabot using
adriaanm/scala-jenkins-infra@a326d52

From now on, push changes to production using `git push production master`.
  • Loading branch information
adriaanm committed Jan 22, 2015
1 parent ebdb8c9 commit 7b525e3
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 0 deletions.
17 changes: 17 additions & 0 deletions deploy/after_push
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -e
oldrev=$1
newrev=$2

run() {
[ -x $1 ] && $1 $oldrev $newrev
}

echo files changed: $(git diff $oldrev $newrev --diff-filter=ACDMR --name-only | wc -l)

umask 002

git submodule sync && git submodule update --init --recursive

run deploy/before_restart
run deploy/restart && run deploy/after_restart
8 changes: 8 additions & 0 deletions deploy/before_restart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env ruby
oldrev, newrev = ARGV

def run(cmd)
exit($?.exitstatus) unless system "umask 002 && #{cmd}"
end

run "sbt stage"
3 changes: 3 additions & 0 deletions deploy/restart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

killall -1 java ||: # only java process run by scabot -- will be restarted by runit
Empty file added log/.empty
Empty file.
Empty file added tmp/.empty
Empty file.

0 comments on commit 7b525e3

Please sign in to comment.