Skip to content

Commit

Permalink
cherry-pick some CI changes
Browse files Browse the repository at this point in the history
Signed-off-by: tao.yang <[email protected]>
  • Loading branch information
ty-dc committed Sep 5, 2024
1 parent 64fa3de commit 265a798
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/e2e-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
6 changes: 5 additions & 1 deletion test/scripts/debugEnv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 265a798

Please sign in to comment.