mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #26448 from pwittrock/fix-26318-kubemark-junit-results
Automatic merge from submit-queue Kubemark e2e tests should exit 0 for test failures. Fixed #26318
This commit is contained in:
commit
5b03fd5697
@ -140,9 +140,7 @@ function install_google_cloud_sdk_tarball() {
|
|||||||
# bringing the cluster down.
|
# bringing the cluster down.
|
||||||
function dump_cluster_logs_and_exit() {
|
function dump_cluster_logs_and_exit() {
|
||||||
local -r exit_status=$?
|
local -r exit_status=$?
|
||||||
if [[ -x "cluster/log-dump.sh" ]]; then
|
dump_cluster_logs
|
||||||
./cluster/log-dump.sh "${ARTIFACTS}"
|
|
||||||
fi
|
|
||||||
if [[ "${E2E_DOWN,,}" == "true" ]]; then
|
if [[ "${E2E_DOWN,,}" == "true" ]]; then
|
||||||
# If we tried to bring the cluster up, make a courtesy attempt
|
# If we tried to bring the cluster up, make a courtesy attempt
|
||||||
# to bring the cluster down so we're not leaving resources
|
# to bring the cluster down so we're not leaving resources
|
||||||
@ -154,6 +152,14 @@ function dump_cluster_logs_and_exit() {
|
|||||||
exit ${exit_status}
|
exit ${exit_status}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Only call after attempting to bring the cluster up. Don't call after
|
||||||
|
# bringing the cluster down.
|
||||||
|
function dump_cluster_logs() {
|
||||||
|
if [[ -x "cluster/log-dump.sh" ]]; then
|
||||||
|
./cluster/log-dump.sh "${ARTIFACTS}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
### Pre Set Up ###
|
### Pre Set Up ###
|
||||||
if running_in_docker; then
|
if running_in_docker; then
|
||||||
curl -fsSL --retry 3 -o "${WORKSPACE}/google-cloud-sdk.tar.gz" 'https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz'
|
curl -fsSL --retry 3 -o "${WORKSPACE}/google-cloud-sdk.tar.gz" 'https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz'
|
||||||
@ -371,7 +377,11 @@ if [[ "${USE_KUBEMARK:-}" == "true" ]]; then
|
|||||||
# If start-kubemark fails, we trigger empty set of tests that would trigger storing logs from the base cluster.
|
# If start-kubemark fails, we trigger empty set of tests that would trigger storing logs from the base cluster.
|
||||||
./test/kubemark/start-kubemark.sh || dump_cluster_logs_and_exit
|
./test/kubemark/start-kubemark.sh || dump_cluster_logs_and_exit
|
||||||
# Similarly, if tests fail, we trigger empty set of tests that would trigger storing logs from the base cluster.
|
# Similarly, if tests fail, we trigger empty set of tests that would trigger storing logs from the base cluster.
|
||||||
./test/kubemark/run-e2e-tests.sh --ginkgo.focus="${KUBEMARK_TESTS:-starting\s30\spods}" "${KUBEMARK_TEST_ARGS:-}" || dump_cluster_logs_and_exit
|
# We intentionally overwrite the exit-code from `run-e2e-tests.sh` because we want jenkins to look at the
|
||||||
|
# junit.xml results for test failures and not process the exit code. This is needed by jenkins to more gracefully
|
||||||
|
# handle blocking the merge queue as a result of test failure flakes. Infrastructure failures should continue to
|
||||||
|
# exit non-0.
|
||||||
|
./test/kubemark/run-e2e-tests.sh --ginkgo.focus="${KUBEMARK_TESTS:-starting\s30\spods}" "${KUBEMARK_TEST_ARGS:-}" || dump_cluster_logs
|
||||||
./test/kubemark/stop-kubemark.sh
|
./test/kubemark/stop-kubemark.sh
|
||||||
NUM_NODES=${NUM_NODES_BKP}
|
NUM_NODES=${NUM_NODES_BKP}
|
||||||
MASTER_SIZE=${MASTER_SIZE_BKP}
|
MASTER_SIZE=${MASTER_SIZE_BKP}
|
||||||
|
Loading…
Reference in New Issue
Block a user