Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prune docker containers (continuously) #37

Merged
merged 4 commits into from
Jul 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions planemo_ci_actions.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#!/usr/bin/env bash
set -exo pipefail

# function running an infinite loop pruning (unused) docker images
function background_prune_docker {
while true; do
docker system prune --all --volumes --force &> /dev/null
sleep 60
done
}

PLANEMO_TEST_OPTIONS=("--database_connection" "$DATABASE_CONNECTION" "--galaxy_source" "https://github.com/$GALAXY_FORK/galaxy" "--galaxy_branch" "$GALAXY_BRANCH" "--galaxy_python_version" "$PYTHON_VERSION" --test_timeout "$TEST_TIMEOUT")
PLANEMO_CONTAINER_DEPENDENCIES=("--biocontainers" "--no_dependency_resolution" "--no_conda_auto_init" "--docker_extra_volume" "./")
PLANEMO_WORKFLOW_OPTIONS=("--tool_data_table" "/cvmfs/data.galaxyproject.org/managed/location/tool_data_table_conf.xml" "--tool_data_table" "/cvmfs/data.galaxyproject.org/byhand/location/tool_data_table_conf.xml" "--docker_extra_volume" "/cvmfs" --shed_tool_conf /tmp/shed_tool_conf.xml --shed_tool_path /tmp/shed_dir)
Expand Down Expand Up @@ -152,7 +160,10 @@ if [ "$MODE" == "test" ]; then

# show tools
cat tool_list_chunk.txt


background_prune_docker &
PRUNE_PID=$!

# Test tools
mkdir -p json_output
touch .tt_biocontainer_skip
Expand All @@ -168,7 +179,6 @@ if [ "$MODE" == "test" ]; then
fi
json=$(mktemp -u -p json_output --suff .json)
PIP_QUIET=1 planemo test "${PLANEMO_OPTIONS[@]}" "${PLANEMO_TEST_OPTIONS[@]}" --test_output_json "$json" "${TOOL_GROUP[@]}" "${ADDITIONAL_PLANEMO_OPTIONS[@]}" || true
docker system prune --all --force --volumes || true
done < tool_list_chunk.txt

if [ ! -s tool_list_chunk.txt ]; then
Expand All @@ -179,6 +189,8 @@ if [ "$MODE" == "test" ]; then
planemo test_reports tool_test_output.json --test_output tool_test_output.html

mv tool_test_output.json tool_test_output.html upload/

kill "$PRUNE_PID"
fi

# combine reports mode
Expand Down