Skip to content

Commit

Permalink
prune docker files before running use cases to prevent running out of…
Browse files Browse the repository at this point in the history
… disk space when running use cases, ci-run-all-diff
  • Loading branch information
georgemccabe committed Oct 16, 2023
1 parent 02a1e4e commit 00bb47b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .github/jobs/free_disk_space.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,25 @@ sudo rm -rf "$AGENT_TOOLSDIRECTORY"
printf "\nChecking disk usage after cleanup"

df -h

echo Pruning docker files

cmd="docker images"
printf "\nBEFORE CLEANUP: $cmd"
$cmd

cmd="docker image prune -af"
printf "\nRunning $cmd"
$cmd

cmd=docker system prune -af
printf "\nRunning $cmd"
$cmd

cmd="docker images"
printf "\nAFTER CLEANUP: $cmd"
$cmd

printf "\nChecking disk usage after Docker cleanup"

df -h
3 changes: 0 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,6 @@ jobs:
if: ${{ always() && steps.run_tests.conclusion == 'failure' }}
run: .github/jobs/save_error_logs.sh

# cleanup Docker images to avoid running out of disk space
- name: Prune Docker images
run: echo BEFORE:; docker images; docker image prune -af; docker system prune -af; echo AFTER:; docker images
# run difference testing
- name: Run difference tests
id: run-diff
Expand Down

0 comments on commit 00bb47b

Please sign in to comment.