Skip to content

Commit

Permalink
Cleanup (deephaven#2016)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed May 23, 2024
1 parent af51a9d commit 0dc27f3
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/docker-scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
# because docker compose run starts dependent containers, but does not stop them
pushd "$(dirname "$0")" # Set pwd to this directory

args=("$@")

# If we are not in CI, remove the container after running. In CI we want to keep
# the container around in case we need to dump the logs in another step of the
# GH action. It should be cleaned up automatically by the CI runner.
if [[ -z "${CI}" ]]; then
args=(--rm "${args[@]}")
if [[ -n "${CI}" ]]; then
# If we are in CI, keep the container around after stopping in case we need to
# dump the logs in another step of the GH action. It should be cleaned up
# automatically by the CI runner.
args=("$@")
else
# Remove the container when not in CI
args=(--rm "$@")
fi

echo docker compose run --service-ports --build "${args[@]}"
Expand Down

0 comments on commit 0dc27f3

Please sign in to comment.