Skip to content

Commit

Permalink
e2e: Add cluster-info as job artifact
Browse files Browse the repository at this point in the history
Use `kubectl cluster-info dump` to retrieve useful
debug information at the end of the end-to-end test run.

Signed-off-by: Andrea Panattoni <[email protected]>
  • Loading branch information
zeeke committed Oct 31, 2023
1 parent c88cc24 commit a647ec8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ jobs:
golangci,
]
runs-on: [ sriov ]
env:
TEST_REPORT_PATH: k8s-artifacts
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand All @@ -116,8 +118,8 @@ jobs:
- uses: actions/upload-artifact@v3
if: always()
with:
name: k8s-artifact
path: ./k8s-artifacts
name: ${{ env.TEST_REPORT_PATH }}
path: ./${{ env.TEST_REPORT_PATH }}

- name: remove virtual cluster
if: always()
Expand All @@ -132,8 +134,9 @@ jobs:
test,
golangci,
]

runs-on: [ ocp ]
env:
TEST_REPORT_PATH: ocp-artifacts
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand All @@ -149,8 +152,8 @@ jobs:
- uses: actions/upload-artifact@v3
if: always()
with:
name: ocp-artifact
path: ./ocp-artifacts
name: ${{ env.TEST_REPORT_PATH }}
path: ./${{ env.TEST_REPORT_PATH }}

- name: remove virtual cluster
if: always()
Expand Down
11 changes: 10 additions & 1 deletion hack/run-e2e-conformance-virtual-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -364,5 +364,14 @@ hack/deploy-wait.sh

if [ -z $SKIP_TEST ]; then
echo "## run sriov e2e conformance tests"
SUITE=./test/conformance JUNIT_OUTPUT=`pwd`/k8s-artifacts hack/run-e2e-conformance.sh

if [[ -v TEST_REPORT_PATH ]]; then
JUNIT_OUTPUT="${root}/${TEST_REPORT_PATH}/conformance-test-report"
fi

SUITE=./test/conformance hack/run-e2e-conformance.sh

if [[ -v TEST_REPORT_PATH ]]; then
kubectl cluster-info dump --namespaces ${NAMESPACE} --output-directory "${root}/${TEST_REPORT_PATH}/cluster-info"
fi
fi
11 changes: 10 additions & 1 deletion hack/run-e2e-conformance-virtual-ocp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,14 @@ hack/deploy-wait.sh

if [ -z $SKIP_TEST ]; then
echo "## run sriov e2e conformance tests"
SUITE=./test/conformance JUNIT_OUTPUT=`pwd`/ocp-artifacts hack/run-e2e-conformance.sh

if [[ -v TEST_REPORT_PATH ]]; then
JUNIT_OUTPUT="${root}/${TEST_REPORT_PATH}/conformance-test-report"
fi

SUITE=./test/conformance hack/run-e2e-conformance.sh

if [[ -v TEST_REPORT_PATH ]]; then
kubectl cluster-info dump --namespaces ${NAMESPACE} --output-directory "${root}/${TEST_REPORT_PATH}/cluster-info"
fi
fi

0 comments on commit a647ec8

Please sign in to comment.