Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Commit

Permalink
Docker images cleanup at start.
Browse files Browse the repository at this point in the history
- Cleanup docker images at start to free disk space. Otherwise it can happen that the invokers do not allow action execution as the free disk space is less than 85% during the tests.
- In case of an error during system test, add the controller and invoker logs to the build output.
  • Loading branch information
falkzoll committed Aug 14, 2023
1 parent 03ce08c commit f6c8336
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ jobs:
distribution: 'temurin'
java-version: 8

- name: Docker Images Cleanup
run: |
df -h
docker image ls
docker image rm $(docker image ls -q) -f
df -h
- name: befor install -> docker.sh
run: ./tools/travis/docker.sh

Expand All @@ -53,7 +60,11 @@ jobs:
# run: ./tools/travis/runUnitTests.sh && ./tools/travis/checkAndUploadLogs.sh unit db

- name: script -> System Tests
run: ./tools/travis/runSystemTests.sh && ./tools/travis/checkAndUploadLogs.sh system
run: |
df -h \
&& ./tools/travis/runSystemTests.sh \
&& df-h \
&& ./tools/travis/checkAndUploadLogs.sh system
#- name: script -> Multi-Runtime Tests
# run: ./tools/travis/runMultiRuntimeTests.sh && ./tools/travis/checkAndUploadLogs.sh multi-runtime
Expand Down
11 changes: 11 additions & 0 deletions tools/travis/runSystemTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,14 @@ export GRADLE_COVERAGE=true
./setupSystem.sh /ansible/files/runtimes-nodeonly.json

./runTests.sh

if [[ "$?" != "0" ]]; then
# debugging notes
# || true; set -x; docker ps -a; for i in $(docker ps -a --format="{{.Names}}"); do docker logs $i || true; done; ls -alhR /tmp/wsklogs;
# || true; set -x; docker ps -a; ls -R /tmp/wsklogs ;cat /tmp/wsklogs/invoker0/invoker0_logs.log; cat /tmp/wsklogs/controller0/controller0_logs.log

set -x # show the following commands in the output
cat /tmp/wsklogs/invoker0/invoker0_logs.log
cat /tmp/wsklogs/controller0/controller0_logs.log
exit 1
fi

0 comments on commit f6c8336

Please sign in to comment.