From 273e60dee183707315415799ae3ed08079ab9ee9 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Sun, 23 Feb 2020 14:53:53 -0500 Subject: gitlab-ci: Add shell subcommand for debugging within CI environment --- .gitlab/ci.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- cgit v1.2.1