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

upload artifacts in github actions for debugging #7599

Merged
merged 2 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
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
12 changes: 12 additions & 0 deletions .github/workflows/acceptance_tests_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
secondary_tests:
required: true
type: string
server_id:
required: true
type: string
env:
UYUNI_PROJECT: uyuni-project
UYUNI_VERSION: master
Expand Down Expand Up @@ -84,4 +87,13 @@ jobs:
run: ./testsuite/podman_runner/18_split_secondary_p_tests.sh
- name: run_secondary_tests
run: ./testsuite/podman_runner/${{ inputs.secondary_tests }}
- name: get_server_logs
if: ${{ failure() }}
jordimassaguerpla marked this conversation as resolved.
Show resolved Hide resolved
run: ./testsuite/podman_runner/19_get_server_logs.sh ${{ inputs.server_id }}
- name: upload_server_log_artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: server_rhn_logs_${{ inputs.server_id }}
path: /tmp/test-all-in-one/server-logs/${{ inputs.server_id }}

1 change: 1 addition & 0 deletions .github/workflows/acceptance_tests_secondary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ jobs:
uses: ./.github/workflows/acceptance_tests_common.yml
with:
secondary_tests: "17_run_secondary_tests.sh"
server_id: "secondary"

Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ jobs:
set: ['1', '2', '3', '4', '5']
with:
secondary_tests: "18_run_secondary_parallelizable_tests_subset.sh ${{ matrix.set }}"
server_id: "secondary_parallel_${{ matrix.set }}"
16 changes: 16 additions & 0 deletions testsuite/podman_runner/19_get_server_logs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -xe

if [ $# -ne 1 ];
then
echo "Usage: ${0} server_id"
echo "server_id is used for creating a unique folder"
exit -1
fi

src_dir=$(cd $(dirname "$0")/../.. && pwd -P)
server_id=${1}
rm -rfv /tmp/test-all-in-one/server-logs/${server_id}
mkdir -p /tmp/test-all-in-one/server-logs/${server_id}
sudo -i podman exec uyuni-server-all-in-one-test bash -c "supportconfig -R /tmp/server-logs/${server_id} && chmod 644 /tmp/server-logs/${server_id}/scc_uyuni-server-all-in-one-test*.txz*"
jordimassaguerpla marked this conversation as resolved.
Show resolved Hide resolved

Loading