Skip to content

Commit

Permalink
Collect server logs in case of integration tests failure
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Bokovoy <[email protected]>
  • Loading branch information
abbra committed Feb 11, 2025
1 parent 171b079 commit 39406bb
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/gating.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,26 @@ jobs:
podman unshare --rootless-netns \
npx cypress run --config-file cypress/cypress.config.ts --browser electron ||:
- name: Collect server logs in case of a test failure
shell: bash
if: failure()
run: |
podman exec -ti server.ipa.demo dnf -y install sos
podman exec -ti server.ipa.demo sos report \
--profile={identity,webserver,security,system,network} \
-a --all-logs --batch
podman exec server.ipa.demo sh -c 'ls /var/tmp/sosreport*' | while read f ; do
podman cp server.ipa.demo:$f tests/ipalab/
done
- name: Upload server logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: webui-server-logs
path: tests/ipalab/sosreport*
if-no-files-found: ignore

- name: Shutdown the test machines and a network
uses: rjeffman/[email protected]
with:
Expand Down

0 comments on commit 39406bb

Please sign in to comment.