diff --git a/.github/workflows/e2e-init.yaml b/.github/workflows/e2e-init.yaml index fc668f79b7..33edee2c4c 100644 --- a/.github/workflows/e2e-init.yaml +++ b/.github/workflows/e2e-init.yaml @@ -207,22 +207,10 @@ jobs: path: e2ereport.json retention-days: 1 - - name: helm uninstalls spiderpool and cleans spiderpool CRD - id: clean - if: ${{ inputs.run_e2e == 'true' }} - run: | - RESULT=0 - make clean_e2e_spiderpool || RESULT=1 - if ((RESULT==0)) ; then - echo "CLEAN_E2E_PASS=true" >> $GITHUB_ENV - else - echo "CLEAN_E2E_PASS=false" >> $GITHUB_ENV - fi - - name: Show e2e Result if: ${{ inputs.run_e2e == 'true' }} run: | - if ${{ env.RUN_E2E_PASS == 'true' && env.CLEAN_E2E_PASS == 'true' }} ;then + if ${{ env.RUN_E2E_PASS == 'true' }} ;then exit 0 else exit 1 @@ -251,3 +239,16 @@ jobs: label: performance message: ${{ env.PERFORMANCE_RESULT }} color: lightgrey + + - name: helm uninstalls spiderpool and cleans spiderpool CRD + id: clean + if: ${{ inputs.run_e2e == 'true' }} + run: | + RESULT=0 + make clean_e2e_spiderpool || RESULT=1 + if ((RESULT==0)) ; then + echo "succeeded to uninstall spiderpool" + else + echo "failed to uninstall spiderpool" + fi + diff --git a/Makefile b/Makefile index 059cbe6f10..9cc27a2a85 100644 --- a/Makefile +++ b/Makefile @@ -427,11 +427,11 @@ clean: clean_e2e .PHONY: clean_e2e_spiderpool clean_e2e_spiderpool: - -$(QUIET) make -C test uninstall_spiderpool + $(QUIET) make -C test uninstall_spiderpool .PHONY: upgrade_e2e_spiderpool upgrade_e2e_spiderpool: - -$(QUIET) make -C test upgrade_spiderpool + $(QUIET) make -C test upgrade_spiderpool .PHONY: codegen codegen: diff --git a/test/Makefile b/test/Makefile index c82a5c0f9f..75746af7cc 100644 --- a/test/Makefile +++ b/test/Makefile @@ -375,7 +375,7 @@ clean_spiderpool_crd: helm_uninstall_spiderpool: @echo -e "\033[35m [helm uninstall spiderpool] \033[0m" helm uninstall $(RELEASE_NAME) --wait --debug -n $(RELEASE_NAMESPACE) \ - --kubeconfig $(E2E_KUBECONFIG) || { KIND_CLUSTER_NAME=$(E2E_CLUSTER_NAME) ./scripts/debugEnv.sh $(E2E_KUBECONFIG) "detail" ; exit 1 ; } ; \ + --kubeconfig $(E2E_KUBECONFIG) || { KIND_CLUSTER_NAME=$(E2E_CLUSTER_NAME) ./scripts/debugEnv.sh $(E2E_KUBECONFIG) "detail" ; exit 1 ; } ; \ echo "Multus config has been cleanup successfully." ; \ for ((i=0; i<100; i++)); do \ if ! kubectl --kubeconfig=$(E2E_KUBECONFIG) get all --all-namespaces | grep -q "spiderpool" ; then \ diff --git a/test/scripts/debugEnv.sh b/test/scripts/debugEnv.sh index 6089a22d4e..80ace83a81 100755 --- a/test/scripts/debugEnv.sh +++ b/test/scripts/debugEnv.sh @@ -78,8 +78,12 @@ elif [ "$TYPE"x == "detail"x ] ; then echo "${ERROR_POD}" for LINE in ${ERROR_POD}; do NS_NAME=${LINE//,/ } - echo "---------------error pod: ${NS_NAME}------------" + echo "---------------describe error pod: ${NS_NAME}------------" kubectl describe pod -n ${NS_NAME} --kubeconfig ${E2E_KUBECONFIG} + echo "---------------logs error pod: ${NS_NAME}------------" + kubectl logs -n ${NS_NAME} --kubeconfig ${E2E_KUBECONFIG} + echo "---------------logs error pod: ${NS_NAME} --previous------------" + kubectl logs -n ${NS_NAME} --kubeconfig ${E2E_KUBECONFIG} --previous done fi