Skip to content

Commit 7b525e3

Browse files
committed
``` 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`.
1 parent ebdb8c9 commit 7b525e3

File tree

5 files changed

+28
-0
lines changed

5 files changed

+28
-0
lines changed

deploy/after_push

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
oldrev=$1
4+
newrev=$2
5+
6+
run() {
7+
[ -x $1 ] && $1 $oldrev $newrev
8+
}
9+
10+
echo files changed: $(git diff $oldrev $newrev --diff-filter=ACDMR --name-only | wc -l)
11+
12+
umask 002
13+
14+
git submodule sync && git submodule update --init --recursive
15+
16+
run deploy/before_restart
17+
run deploy/restart && run deploy/after_restart

deploy/before_restart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env ruby
2+
oldrev, newrev = ARGV
3+
4+
def run(cmd)
5+
exit($?.exitstatus) unless system "umask 002 && #{cmd}"
6+
end
7+
8+
run "sbt stage"

deploy/restart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
killall -1 java ||: # only java process run by scabot -- will be restarted by runit

log/.empty

Whitespace-only changes.

tmp/.empty

Whitespace-only changes.

0 commit comments

Comments
 (0)