Skip to content

Commit 9d03d09

Browse files
authored
Merge pull request #1550 from saschagrunert/logs
Improve CRI-O test log collection
2 parents 4eaec8d + 3b1e933 commit 9d03d09

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.github/workflows/crio.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ jobs:
9393
ARGS=(--ginkgo.skip 'SupplementalGroups|AppArmor|RunAsUser')
9494
fi
9595
96+
set +o errexit
9697
sudo -E PATH=$PATH critest \
9798
--runtime-endpoint=unix:///var/run/crio/crio.sock \
9899
--parallel=$(nproc) \
@@ -102,18 +103,31 @@ jobs:
102103
--ginkgo.trace \
103104
--ginkgo.vv \
104105
"${ARGS[@]}"
106+
TEST_RC=$?
107+
set -o errexit
108+
109+
sudo journalctl --no-pager > journal.log
110+
test $TEST_RC -ne 0 && cat journal.log
111+
exit $TEST_RC
105112
106113
- name: Run crictl e2e tests
107114
if: ${{matrix.suite == 'e2e'}}
115+
shell: bash
108116
run: |
117+
set -euox pipefail
118+
119+
set +o errexit
109120
sudo -E PATH=$PATH make test-e2e \
110121
TESTFLAGS="-crictl-runtime-endpoint=unix://var/run/crio/crio.sock"
122+
TEST_RC=$?
123+
set -o errexit
111124
112-
- name: Collect CRI-O logs
113-
run: sudo journalctl -u crio > cri-o.log
125+
sudo journalctl --no-pager > journal.log
126+
test $TEST_RC -ne 0 && cat journal.log
127+
exit $TEST_RC
114128
115-
- name: Upload CRI-O logs
129+
- name: Upload logs
116130
uses: actions/upload-artifact@v4
117131
with:
118-
name: cri-o-${{matrix.suite}}-${{matrix.oci-runtime}}-${{matrix.monitor}}-${{github.sha}}.log
119-
path: cri-o.log
132+
name: ${{matrix.suite}}-${{matrix.oci-runtime}}-${{matrix.monitor}}-${{github.sha}}.log
133+
path: journal.log

0 commit comments

Comments
 (0)