summaryrefslogtreecommitdiff
path: root/wercker.yml
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2019-05-23 08:41:18 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2019-05-23 08:41:19 -0700
commit187ef00a41ca28a26ffa0a9399c48335578590bb (patch)
tree7f36bf78959e135b1c8f43179eb4024649fe78da /wercker.yml
parent4fe908c1643c3f355edd787bb651aefb53b996c0 (diff)
wercker.yml: Commit MJIT debug logs to another repository
because too-large Wercker output is truncated. ruby/mjit-debug is a private repository for now, because the person fixing it is likely to be me or another committer.
Diffstat (limited to 'wercker.yml')
-rw-r--r--wercker.yml22
1 files changed, 16 insertions, 6 deletions
diff --git a/wercker.yml b/wercker.yml
index ae9d3c04db..6e810a1ef3 100644
--- a/wercker.yml
+++ b/wercker.yml
@@ -29,16 +29,26 @@ mjit-test1:
cat <<'EOS' > /usr/local/bin/mjit-debug-on-fail
#!/bin/bash
if ! "$@"; then
- for f in $(find /tmp -type f -name "_ruby_mjit*.c"); do
- echo "[${f}]==="
- cat "$f"
- echo "==="
- echo
- done
+ git clone --depth=1 git@github.com:ruby/mjit-debug
+ cd mjit-debug
+
+ debug_dir="$(date '+%F_%T')"
+ mkdir "$debug_dir"
+ cp /tmp/_ruby_mjit*.c "$debug_dir"
+
+ git add "$debug_dir"
+ git commit -m "Debug ${debug_dir}: ${WERCKER_BUILD_URL}"
+ git push origin master
exit 1
fi
EOS
chmod +x /usr/local/bin/mjit-debug-on-fail
+ # git push access to ruby/mjit-debug (private repository)
+ - add-ssh-key:
+ keyname: MJIT_DEBUG
+ host: github.com
+ - add-to-known_hosts:
+ hostname: github.com
# --jit
- script: