summaryrefslogtreecommitdiff
path: root/.gitlab
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-02-23 14:53:53 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-26 15:10:09 -0500
commit273e60dee183707315415799ae3ed08079ab9ee9 (patch)
tree871e7dde5ea39d18eb9a12cca98c34adddbf8928 /.gitlab
parent972bcf3a1971691ec809452322404ce8f65ad721 (diff)
downloadhaskell-273e60dee183707315415799ae3ed08079ab9ee9.tar.gz
gitlab-ci: Add shell subcommand for debugging within CI environment
Diffstat (limited to '.gitlab')
-rwxr-xr-x.gitlab/ci.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index 29421e56f7..7df32b3e35 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -408,6 +408,15 @@ function clean() {
run rm -Rf _build
}
+# A convenience function to allow debugging in the CI environment.
+function shell() {
+ local cmd=$@
+ if [ -z "$cmd" ]; then
+ cmd="bash -i"
+ fi
+ run $cmd
+}
+
# Determine Cabal data directory
case "$(uname)" in
MSYS_*|MINGW*) exe=".exe"; cabal_dir="$APPDATA/cabal" ;;
@@ -437,5 +446,6 @@ case $1 in
build_hadrian) build_hadrian ;;
test_hadrian) fetch_perf_notes; test_hadrian; push_perf_notes ;;
clean) clean ;;
+ shell) shell $@ ;;
*) fail "unknown mode $1" ;;
esac