Skip to content

Commit

Permalink
Merge pull request #7599 from jordimassaguerpla/upload_github_artifacts
Browse files Browse the repository at this point in the history
upload artifacts in github actions for debugging
  • Loading branch information
jordimassaguerpla authored Sep 29, 2023
2 parents 77c4ee9 + 2160b60 commit baf09e4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
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() }}
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"

1 change: 1 addition & 0 deletions .github/workflows/acceptance_tests_secondary_parallel.yml
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*"

0 comments on commit baf09e4

Please sign in to comment.