Skip to content

Commit

Permalink
Download installation logs on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
replaceafill committed May 3, 2024
1 parent d930d8d commit 7988a35
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/archivematica-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,25 @@ jobs:
-u ubuntu \
-e "archivematica_src_am_version=${{ env.am_version }} archivematica_src_ss_version=${{ env.ss_version }}" \
-vvv
- name: "Save logs"
if: "${{ failure() }}"
working-directory: "${{ github.workspace }}/tests/archivematica-acceptance-tests"
run: |
mkdir /tmp/logs
podman-compose exec --user root archivematica cp -r /var/log /tmp/logs
podman-compose exec --user root archivematica cp -r /etc /tmp/logs
podman-compose exec --user root archivematica cp -r /usr/lib/systemd /tmp/logs
podman-compose exec --user root archivematica journalctl --no-pager > /tmp/logs/journalctl.log
podman-compose exec --user root archivematica chown -R ubuntu:ubuntu /tmp/logs
podman cp archivematica-acceptance-test_archivematica_1:/tmp/logs/ /tmp/logs
sudo chown -R $USER /tmp/logs
tar -czf /tmp/logs.tar.gz /tmp/logs
- name: "Upload logs on failure"
if: "${{ failure() }}"
uses: "actions/upload-artifact@v4"
with:
name: "logs-${{ matrix.docker_image.label }}-${{ matrix.feature }}"
path: "/tmp/logs.tar.gz"
- name: "Prepare the container for running the AMAUATs"
working-directory: "${{ github.workspace }}/tests/archivematica-acceptance-tests"
run: |
Expand Down

0 comments on commit 7988a35

Please sign in to comment.