From fa0584eb829f2cb52675e17b5b09b4c648378d38 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Mon, 9 Jan 2023 10:42:19 +0100 Subject: [PATCH] ci: Stop and remove CI container --- ci/test/04_install.sh | 1 + ci/test/06_script_b.sh | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh index fa62c721037..ec604c94760 100755 --- a/ci/test/04_install.sh +++ b/ci/test/04_install.sh @@ -50,6 +50,7 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then --env-file /tmp/env \ --name $CONTAINER_NAME \ $CI_IMAGE_NAME_TAG) + export CI_CONTAINER_ID # Create a non-root user inside the container which matches the local user. # diff --git a/ci/test/06_script_b.sh b/ci/test/06_script_b.sh index ac2df5fbfb3..02c91cfa696 100755 --- a/ci/test/06_script_b.sh +++ b/ci/test/06_script_b.sh @@ -82,3 +82,8 @@ fi if [ "$RUN_FUZZ_TESTS" = "true" ]; then CI_EXEC LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" test/fuzz/test_runner.py "${FUZZ_TESTS_CONFIG}" "$MAKEJOBS" -l DEBUG "${DIR_FUZZ_IN}" fi + +if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then + echo "Stop and remove CI container by ID" + docker container kill "${CI_CONTAINER_ID}" +fi