Skip to content

Commit

Permalink
fix: e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
gosharo committed Dec 18, 2023
1 parent fe557cb commit 17c69bf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ jobs:
[ ! -z "$RESULT" ] && echo "CRD created $RESULT" || { echo "Workflow not exists, existing..."; exit 1; }
## check if status phase not Failed, if yes, show message
RESULT=$(kubectl get workflows.argoproj.io -n workflows --selector=branch=${{ github.head_ref }}-test --no-headers -o custom-columns="Status:status.phase")
MESSAGE=$(kubectl get workflows.argoproj.io -n workflows --selector=branch=${{ github.head_ref }}-test --no-headers -o custom-columns="Status:status.message")
BRANCH_VALID_STRING =$(echo ${{ github.head_ref }}-test | tr '[:upper:]' '[:lower:]' | tr '_' '-' | tr -cd 'a-z0-9.\-')
RESULT=$(kubectl get workflows.argoproj.io -n workflows --selector=branch=$BRANCH_VALID_STRING --no-headers -o custom-columns="Status:status.phase")
MESSAGE=$(kubectl get workflows.argoproj.io -n workflows --selector=branch=$BRANCH_VALID_STRING --no-headers -o custom-columns="Status:status.message")
[ ! "$RESULT" == "Failed" ] && echo "CRD created $MESSAGE" || { echo "Workflow Failed $MESSAGE, existing..."; exit 1; }

0 comments on commit 17c69bf

Please sign in to comment.