Skip to content

Commit 9aed4e7

Browse files
committed
Drop into shell on build failure
1 parent c446dc9 commit 9aed4e7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/ci.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ function cleanup() {
1212
docker-compose rm -f "${OS}"
1313
}
1414

15+
function debug() {
16+
local container="$(docker-compose ps -q "${OS}")"
17+
docker exec -it "${container}" /bin/bash
18+
}
19+
1520
function main() {
1621
docker-compose up -d "${OS}"
1722

@@ -44,6 +49,7 @@ function main() {
4449
docker exec -t "${container}" rspec "${WORKSPACE}/tests/spec/${SERVER}_spec.rb"
4550
}
4651

52+
[[ -z "${CI:-}" ]] && trap debug ERR
4753
trap cleanup EXIT
4854

4955
main "${@}"

0 commit comments

Comments
 (0)